[TIMOB-519] problem with this in callbacks for XHR
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:53:22.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 M04 |
Components | iOS |
Labels | ios, iphone, xhr |
Reporter | Jeff Haynie |
Assignee | Jeff Haynie |
Created | 2011-04-15T02:30:51.000+0000 |
Updated | 2011-04-17T01:53:22.000+0000 |
Description
http://support.appcelerator.net/discussions/support/1990-getresponseheader-for-set-cookie"> http://support.appcelerator.net/discussions/support/1990-getrespons...
looks like this.responseHeader isn't getting correctly dispatched through this pointer proxy.
Comments
- Brion Vibber 2011-04-15
Sample code to reproduce:
var client = Titanium.Network.createHTTPClient(); client.onload = function() { Titanium.API.info("Loaded! Status: " + this.status); var contentType = this.getResponseHeader('Content-Type'); Titanium.API.info("Content-Type: " + contentType); }; client.open("GET", "http://example.com/"); client.send();
got on iphone:
[INFO] Loaded! Status: 200 [INFO] Content-Type: null <- BROKENgot on android:
I/TiAPI (11249): (kroll$1) [23,606] Loaded! Status: 200
I/TiAPI (11249): (kroll$1) [13,619] Content-Type: text/html; charset=UTF-8 <- fine - Brion Vibber 2011-04-15
- Jake Howerton 2011-04-15
Isn't this somewhat critical? Does anyone have a patch for it?
- Jeff Haynie 2011-04-15
(from [074c3e8c9cd6bc80af9ca53256a23ba24d1e09dc]) [#519 state:fixed-in-qa] Set response headers correctly in HTTP response. https://github.com/appcelerator/titanium_mobile/commit/074c3e8c9cd6bc80af9ca53256a23ba24d1e09dc"> https://github.com/appcelerator/titanium_mobile/commit/074c3e8c9cd6...
- Pedro Enrique 2011-04-15
Just checked the sample code provided by Brion Vibber against 1.5 on simulator with the following address:
http://developer.appcelerator.com/apidoc/mobile/1.4/api.json">http://developer.appcelerator.com/apidoc/mobile/1.4/api.jsonThe console returs:
[INFO] Loaded! Status: 200 [INFO] Content-Type: text/jsonTicket resolved
- Conrad 2011-04-15
Using mobile sdk 1.6.1 and iOS (any version), this problem persists depending on which version of Apache is running on the server. Is there any way to collect the raw headers and parse them myself? I believe getAllHeaders is not supported in iOS still.