{ "id": "147782", "key": "TIMOB-18902", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16919", "description": "Critical updates", "name": "Release 4.1.1", "archived": true, "released": true, "releaseDate": "2015-07-15" }, { "id": "16925", "description": "WatchKit Support--all going into 5.0 now", "name": "Release 5.0.0", "archived": true, "released": true, "releaseDate": "2015-09-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-08-07T19:12:16.000+0000", "created": "2015-05-13T14:13:28.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "header", "httpclient", "mutipart" ], "versions": [ { "id": "16711", "description": "Release 3.5.1", "name": "Release 3.5.1", "archived": false, "released": true, "releaseDate": "2015-03-06" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "issuelinks": [ { "id": "48618", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "inwardIssue": { "id": "150303", "key": "CLI-763", "fields": { "summary": "In preprod, if you create a Titanium project and try to run it, then \"Application not registered\" error appears", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "52471", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "149884", "key": "TIMOB-20181", "fields": { "summary": "iOS: HTTPClient multipart/form-data produces bad content-type headers for individual parts", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "48996", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "151131", "key": "TIMOB-19501", "fields": { "summary": "Android https calls are not working with 4.1.X sdk", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "48998", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "151127", "key": "TIMOB-19499", "fields": { "summary": "iOS https calls are not working with 4.1.X sdk", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-08-18T08:06:40.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h5.Description:\r\nHTTP request sends post to a Salesforce.com REST api that is expecting a multipart request with content-type set clearly for each of the parts, like the following:\r\n{quote}\r\nPOST /services/data/v33.0/chatter/feed-elements HTTP/1.1 \r\nAuthorization: OAuth 00DRR0000000N0g!... \r\nUser-Agent: Jakarta Commons-HttpClient/3.0.1 \r\nHost: instance_name \r\nContent-Length: 845 \r\nContent-Type: multipart/form-data; boundary=boundary \r\nAccept: application/json \r\n\r\n--boundary \r\nContent-Disposition: form-data; name=\"json\" \r\nContent-Type: application/json; charset=UTF-8 \r\n\r\n{ \r\n\"somejson\":\"data\" \r\n} \r\n\r\n--boundary \r\nContent-Disposition: form-data; name=\"feedElementFileUpload\"; filename=\"receipt.pdf\" \r\nContent-Type: application/octet-stream; charset=ISO-8859-1 \r\n\r\nfilecontent \r\n{quote}\r\n\r\nIf we set xhr.setRequestHeader(\"enctype\", \"multipart/form-data\"), This is fine for the file part, as Titanium is doing the magic. However, for the json part, Titanium will not set it and hence caused parsing errors for the post request. How can we support that?", "attachment": [ { "id": "56163", "filename": "testServer.js", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-07-15T04:39:20.000+0000", "size": 223, "mimeType": "text/javascript" } ], "flagged": false, "summary": "HTTPClient: unable set content-type as json for multipart post request using Httpclient", "creator": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "subtasks": [], "reporter": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "environment": null, "closedSprints": [ { "id": 451, "state": "closed", "name": "2015 Sprint 16 SDK", "startDate": "2015-08-01T00:30:05.052Z", "endDate": "2015-08-15T00:30:00.000Z", "completeDate": "2015-08-17T05:55:00.386Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "352713", "author": { "name": "eddie.wu", "key": "eddie.wu", "displayName": "Eddie Wu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi is there a fix plan or ETA? Many thanks.", "updateAuthor": { "name": "eddie.wu", "key": "eddie.wu", "displayName": "Eddie Wu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-16T14:39:23.000+0000", "updated": "2015-05-16T14:39:23.000+0000" }, { "id": "356863", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~sliang], Just to check before we investigate further, in the sample code, it should be an array as a parameter in \r\n{code:java}\r\nxhr.send(array)\r\n{code}\r\n right?\r\n\r\nh4.It should be:\r\n{code:java}\r\nxhr.send([data2send]);\r\n{code}", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-07-03T05:39:23.000+0000", "updated": "2015-07-03T05:39:23.000+0000" }, { "id": "356879", "author": { "name": "eddie.wu", "key": "eddie.wu", "displayName": "Eddie Wu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Chee Kiat Ng, not exactly - according to the document - http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Network.HTTPClient-method-send\r\n\r\n\r\n{code:java}\r\nParameters\r\ndata : Object/String/Titanium.Filesystem.File/Titanium.Blob (optional)\r\nData to send with a POST request.\r\n{code}\r\n", "updateAuthor": { "name": "eddie.wu", "key": "eddie.wu", "displayName": "Eddie Wu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-07-03T08:03:27.000+0000", "updated": "2015-07-03T08:03:27.000+0000" }, { "id": "357736", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Android PR: https://github.com/appcelerator/titanium_mobile/pull/6976\r\n\r\nNode JS server code [^testServer.js] also attached here. For testing instructions, check PR in Github.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-07-15T04:53:59.000+0000", "updated": "2015-07-15T04:53:59.000+0000" }, { "id": "357744", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~hpham] Could you review the above PR? ", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-07-15T06:21:04.000+0000", "updated": "2015-07-15T06:21:04.000+0000" }, { "id": "358117", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Reopening issue as iOS is not completed yet. [~cng] Android PR has been merged.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-07-22T03:50:45.000+0000", "updated": "2015-07-22T03:50:45.000+0000" }, { "id": "358487", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "iOS PRs done:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/6991\r\nhttps://github.com/appcelerator/APSHTTPClient/pull/27", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-07-29T07:47:04.000+0000", "updated": "2015-07-29T07:47:04.000+0000" }, { "id": "358912", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PRs updated again, so that change is only applied to content-type for multipart post. The rest of the behavior remains the same.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-04T07:17:25.000+0000", "updated": "2015-08-04T07:17:25.000+0000" }, { "id": "359145", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Android Backport to 4_1_X: https://github.com/appcelerator/titanium_mobile/pull/7009\r\n[~hpham] For your review.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-08-06T01:24:08.000+0000", "updated": "2015-08-06T01:24:08.000+0000" }, { "id": "359152", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "iOS backport to 4_1_X: https://github.com/appcelerator/titanium_mobile/pull/7010\r\n[~pec1985], For your review and merge.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-06T02:32:43.000+0000", "updated": "2015-08-06T02:32:43.000+0000" }, { "id": "359772", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "all outstanding PRs merged.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-13T03:29:37.000+0000", "updated": "2015-08-13T03:29:37.000+0000" }, { "id": "361130", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\n\r\nMacOS 10.11 (15A263e)\r\nStudio 5.0.0.201508181557\r\nTi SDK 4.1.1.v20150816214206\r\nAppc NPM 4.2.0-1\r\nAppc CLI 4.1.3-6\r\nTi CLI 4.0.1\r\nAlloy 1.6.2\r\nArrow 1.2.38\r\nXcode 6.4 (6E35b)\r\nNode v0.10.37\r\nJava 1.7.0_45\r\npreproduction\r\n\r\nSuccessfully get expected JSON return from sample code on Android and iOS", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-25T17:32:34.000+0000", "updated": "2015-08-25T17:32:34.000+0000" } ], "maxResults": 34, "total": 34, "startAt": 0 } } }