[TIMOB-3358] Android: HTTP POST send argument with null value causes exception
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:01:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0, Sprint 2011-11 |
Components | Android |
Labels | android, defect, http, reported-1.6.0 |
Reporter | Opie Cyrus |
Assignee | Opie Cyrus |
Created | 2011-04-15T03:43:10.000+0000 |
Updated | 2011-04-17T02:01:32.000+0000 |
Description
When sending a HTTP POST request where one of the send arguments has a null value and exception will occur. Correct behavior should be to ignore the key / value pair when the value is null.
Example use case:
xhr.send({ somearg: 'ok', thisCrashesApp: null });
Attachments
File | Date | Size |
---|---|---|
app.js | 2011-04-15T03:43:10.000+0000 | 1575 |
(from [6d1f2c9a8b0949bd8f19c8ff34653a43d8ebf6fd]) [#3358 state:fixed-in-qa] Handle null HTTP POST request arguments correctly
When a HTTP POST request argument on send() has a null value, ignore the key/valye pair when sending.
https://github.com/appcelerator/titanium_mobile/commit/6d1f2c9a8b0949bd8f19c8ff34653a43d8ebf6fd"> https://github.com/appcelerator/titanium_mobile/commit/6d1f2c9a8b09...
Please verify the issue with the attached app.js. Basically, if the app runs without crashing, the fix is good.
Tested with Titanium SDK version: 1.7.0 (03/17/11 10:02 630a276)
Emulator 2.1 [INFO] [3,9640] responseText=
It works2!
Nexus S 2.3.2 (kroll$1: app://app.js) [0,916] responseText=
It works2!