[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.
Sample code to reproduce:
got on iphone:
[INFO] Loaded! Status: 200 [INFO] Content-Type: null <- BROKEN
got 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
Several related issues also mentioned on https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/1502-httpclient-problems-with-header-parsing-and-responsedata-in-onerror-handler"> https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobi...
Isn't this somewhat critical? Does anyone have a patch for it?
(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...
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.json
The console returs:
[INFO] Loaded! Status: 200 [INFO] Content-Type: text/json
Ticket resolved
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.