{ "id": "63307", "key": "TIMOB-2675", "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": "11239", "name": "Release 1.6.0 M06", "archived": true, "released": true, "releaseDate": "2011-01-24" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:59:47.000+0000", "created": "2011-04-15T03:26:37.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "content-type", "headers", "ios", "release-1.6.0", "rplist", "xhr" ], "versions": [], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:59:47.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

Self-explanitory. Sample code from #1983:

\n
\nvar xhr = Titanium.Network.createHTTPClient();\nxhr.onload = function()\n{\n       Ti.API.info('I am in utf-8 onload for POST');\n};\nxhr.onerror = function()\n{\n       Ti.API.info('I am in utf-8 error for POST');\n};\nxhr.setRequestHeader(\"setoutside\", \"one\");\nxhr.open(\"POST\",\"http://api.localmedia.fm/files/endpoint_webform.cfm\");\nxhr.setRequestHeader(\"content-type\", \"multipart/form-data\");\nxhr.setRequestHeader(\"setinside\", \"two\");\nxhr.send({\"a\":\"hi\", \"b\":\"there\"});\n
\n

The response is always:

\n
\nContent-Type     application/x-www-form-urlencoded; charset=utf-8\n
\n

Should be considered part of the XHR refactor.

{html}", "attachment": [], "flagged": false, "summary": "Can't set Content-Type request header", "creator": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "129161", "author": { "name": "anthonywebb", "key": "anthonywebb", "displayName": "Anthony Webb", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

@stephen, Any sort of an ETA on this bug being fixed? I'd rather\ngo through this app store approval process once, so if it is coming\nsoon then I will hang tight for a fix, if not then I should\nprobably remove camera support from my app and go ahead and get the\napp submitted without it. Just give me an idea of how\ncomplicated/important this bug fix is to you guys right now.\nThanks.

{html}", "updateAuthor": { "name": "anthonywebb", "key": "anthonywebb", "displayName": "Anthony Webb", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:37.000+0000", "updated": "2011-04-15T03:26:37.000+0000" }, { "id": "129162", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

It will be fixed for 1.6.0. There is no other timeline on this\nbug.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:38.000+0000", "updated": "2011-04-15T03:26:38.000+0000" }, { "id": "129163", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Ticket is targeted to be fixed by Jan 17, but there are no\nguarantees.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:38.000+0000", "updated": "2011-04-15T03:26:38.000+0000" }, { "id": "129164", "author": { "name": "taazza", "key": "taazza", "displayName": "Taazza", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Jan 17th is the target date for 1.6?

{html}", "updateAuthor": { "name": "taazza", "key": "taazza", "displayName": "Taazza", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:38.000+0000", "updated": "2011-04-15T03:26:38.000+0000" }, { "id": "129165", "author": { "name": "anthonywebb", "key": "anthonywebb", "displayName": "Anthony Webb", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Thanks Stephen. I'll hang tight, really appreciate the help,\nthis is a bit of a blocker for me.

{html}", "updateAuthor": { "name": "anthonywebb", "key": "anthonywebb", "displayName": "Anthony Webb", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:38.000+0000", "updated": "2011-04-15T03:26:38.000+0000" }, { "id": "129166", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

No. Only this ticket is targeted for that date.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:38.000+0000", "updated": "2011-04-15T03:26:38.000+0000" }, { "id": "129167", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "{html}

Associated Helpdesk Ticket

\n

http://developer.appcelerator.com/helpdesk/view/65171

{html}", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-04-15T03:26:40.000+0000", "updated": "2011-04-15T03:26:40.000+0000" }, { "id": "129168", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Assigned to somebody else so moved to M06.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:40.000+0000", "updated": "2011-04-15T03:26:40.000+0000" }, { "id": "129169", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [623a1f982c3f4107d250179d52bd9ccbe3374994])\n[#2675 state:fixed-in-qa] Allow setting of\n'Content-Type'. \nhttps://github.com/appcelerator/titanium_mobile/commit/623a1f982c3f...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:41.000+0000", "updated": "2011-04-15T03:26:41.000+0000" }, { "id": "129170", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Two things to note:

\n
{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:41.000+0000", "updated": "2011-04-15T03:26:41.000+0000" }, { "id": "129171", "author": { "name": "anthonywebb", "key": "anthonywebb", "displayName": "Anthony Webb", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I see the code has been committed, at what point are these fixes\npicked up by nightly builds for testing? I assume \"fixed-in-qa\" is\nan internal thing? Thanks a bunch this should allow me to move\nforward.

{html}", "updateAuthor": { "name": "anthonywebb", "key": "anthonywebb", "displayName": "Anthony Webb", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:41.000+0000", "updated": "2011-04-15T03:26:41.000+0000" }, { "id": "129172", "author": { "name": "anthonywebb", "key": "anthonywebb", "displayName": "Anthony Webb", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I saw in the continuous build that this change was in there so I\ngave it a shot:

\n
\nvar xhr = Titanium.Network.createHTTPClient();\nxhr.onload = function()\n{Ti.API.info('onLoad for POST, firing event with data: ' + this.responseText);};\nxhr.onerror = function()\n{Ti.API.info('I am in utf-8 error for POST');};\nxhr.open(\"POST\",\"http://api.localmedia.fm/files/test.cfm\");\nxhr.setRequestHeader(\"Content-Type\", \"multipart/form-data\");\nxhr.send({\"a\":\"hi\", \"b\":\"there\"});\n
\nIt appears as though it is still broke though. If I run the code\nabove I get:
\n
\n[INFO] onLoad for POST, firing event with data: undefined\n
\nIf I comment out the setRequestHeader() then it goes through fine\n:(
{html}", "updateAuthor": { "name": "anthonywebb", "key": "anthonywebb", "displayName": "Anthony Webb", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:41.000+0000", "updated": "2011-04-15T03:26:41.000+0000" }, { "id": "129173", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

As indicated in this ticket we do not support multipart\nmessages. There is no timeline for this feature.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:41.000+0000", "updated": "2011-04-15T03:26:41.000+0000" }, { "id": "129174", "author": { "name": "anthonywebb", "key": "anthonywebb", "displayName": "Anthony Webb", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Any fresh ideas on letting the user POST photos that the user\ntakes to my server? Seems like something pretty basic I want to do\nhere? Additionally, it would have been nice to know this a month\nago when this ticket was opened so I could have asked this question\nback then.

{html}", "updateAuthor": { "name": "anthonywebb", "key": "anthonywebb", "displayName": "Anthony Webb", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:41.000+0000", "updated": "2011-04-15T03:26:41.000+0000" }, { "id": "129175", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "{html}

The customer's issue hasn't been fixed. The original code\nincludes \"multipart/form-data\" as the content type, so I'm not sure\nwhy this is marked as fixed-in-qa when I believe it isn't.

\n

Please let me know if you would like an additional ticket\ncreated for supporting multipart messages.

{html}", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-04-15T03:26:42.000+0000", "updated": "2011-04-15T03:26:42.000+0000" }, { "id": "129176", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Supporting multipart mime is a different issue from \"Can't set\nContent-Type request header.\" The bug, as described in the original\nticket, is fixed.

\n

Create a second bug for multipart support.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:42.000+0000", "updated": "2011-04-15T03:26:42.000+0000" }, { "id": "129177", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

Initial bug fixed.

\n

Tested on iPhone Simulator 4.2 with code provided

\n

Ti SDK 1.6 (Jan 27 2011 16:11 rc27ef530)

{html}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:42.000+0000", "updated": "2011-04-15T03:26:42.000+0000" }, { "id": "129178", "author": { "name": "andrecarregal", "key": "andrecarregal", "displayName": "Andre Carregal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I've added a new bug report ((#3145)) for the multipart\nsupport.

{html}", "updateAuthor": { "name": "andrecarregal", "key": "andrecarregal", "displayName": "Andre Carregal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:26:42.000+0000", "updated": "2011-04-15T03:26:42.000+0000" } ], "maxResults": 18, "total": 18, "startAt": 0 } } }