{ "id": "63212", "key": "TIMOB-2580", "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": "11238", "name": "Release 1.6.0 M05", "archived": true, "released": true, "releaseDate": "2011-01-17" } ], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2011-04-15T03:23:24.000+0000", "created": "2011-04-15T03:23:23.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "1.5.0", "httpclient", "ios", "release-1.6.0", "response", "xhr" ], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-03T05:45:41.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}

My app talks to a backend service to upload images. After\nsuccessful upload, the service responds with a 302, setting the\nLocation: header to the URL of the image.

\n

The app works with Ti 1.4.2. With 1.5.0, the Location: header is\nmissing from the response.

\n

Client code:
\nxhr.open('POST', url, false);
\nxhr.onload = function() {
\nlocation = xhr.getResponseHeader('Location');
\nafter_upload_callback(location);
\n};

\n

xhr.setRequestHeader('Content-Type', 'form-data');
\nxhr.setRequestHeader(\"Cache-Control\", \"no-cache\");
\nxhr.send({ file:media });

{html}", "attachment": [], "flagged": false, "summary": "1.5.0: HTTP 302 response headers missing", "creator": { "name": "tomquas", "key": "tomquas", "displayName": "tom quas", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tomquas", "key": "tomquas", "displayName": "tom quas", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "128845", "author": { "name": "tomquas", "key": "tomquas", "displayName": "tom quas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

After further investigation, I figured that the server returns a\n200 response. The image upload works. Still, any response headers\nare missing with 1.5.0. FWIW, I attached the server code\nsnippet.

\n

class\nUploadHandler(blobstore_handlers.BlobstoreUploadHandler):

\n
\ndef get(self):\n    pass\n\ndef post(self):\n    \"\"\" Stores a BLOB and returns its key.\"\"\"\n    blob_info = self.get_uploads()[0]\n    asset_info = AssetInfo(blob=blob_info.key())\n    asset_info.put()\n    self.redirect('/serve/%s' % asset_info.key().id())   # invokes ServeHandler\n
\n

class ServeHandler(webapp.RequestHandler):

\n
\ndef post(self, asset_id):\n    self.response.headers['Pragma'] = 'no-cache'\n    self.response.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate, pre-check=0, post-check=0'\n    url = \"%s/asset/%s\" % (self.request.host_url, asset_id)\n    self.response.headers['Location'] = url\n
{html}", "updateAuthor": { "name": "tomquas", "key": "tomquas", "displayName": "tom quas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:23.000+0000", "updated": "2011-04-15T03:23:23.000+0000" }, { "id": "128846", "author": { "name": "tomquas", "key": "tomquas", "displayName": "tom quas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

fixed w/ 1.5.1. thx.

{html}", "updateAuthor": { "name": "tomquas", "key": "tomquas", "displayName": "tom quas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:24.000+0000", "updated": "2011-04-15T03:23:24.000+0000" }, { "id": "128847", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Duplicate of other 1.5.x response header bugs.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:25.000+0000", "updated": "2011-04-15T03:23:25.000+0000" }, { "id": "128848", "author": { "name": "tomquas", "key": "tomquas", "displayName": "tom quas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

duplicate of... which ticket? I still need to follow progress on\nthis issue.

\n

thx, stephen

{html}", "updateAuthor": { "name": "tomquas", "key": "tomquas", "displayName": "tom quas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:25.000+0000", "updated": "2011-04-15T03:23:25.000+0000" }, { "id": "128849", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

You yourself said that the issue was fixed in 1.5.1. This was\npart of the HTTPResponse refactor to allow access to underlying\nproperties of the client. I'm unable to get a bug number because\nlighthouse sucks.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:25.000+0000", "updated": "2011-04-15T03:23:25.000+0000" }, { "id": "128850", "author": { "name": "tomquas", "key": "tomquas", "displayName": "tom quas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Ah, I misinterpreted this. Duplicate == closed. Thx

{html}", "updateAuthor": { "name": "tomquas", "key": "tomquas", "displayName": "tom quas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:25.000+0000", "updated": "2011-04-15T03:23:25.000+0000" }, { "id": "408750", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing issue due to time passed and irrelevance of the ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-03T05:45:41.000+0000", "updated": "2017-03-03T05:45:41.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }