Side navigation
#8837 closed bug (invalid)
Opened April 10, 2011 10:06PM UTC
Closed April 11, 2011 04:56AM UTC
Last modified March 14, 2012 03:53PM UTC
jqXHR.getAllResponseHeaders() returns only ‘Content-Type’
Reported by: | hello@frantisekhaba.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.next |
Component: | ajax | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi,
jqXHR.getAllResponseHeaders() returned only ‘Content-Type’ header, despite server had returned following headers.
Access-Control-Allow-Headers:Content-Type, X-DwA-Source, X-DwA-Signature, X-Requested-With Access-Control-Allow-Methods:POST, GET, PUT, DELTE, OPTIONS Access-Control-Allow-Origin:* Connection:keep-alive Content-Length:64 Content-Type:application/json;charset=utf-8 Server:thin 1.2.7 codename No Hup X-DwA-Build:git_revize
jQuery version
1.5.2
Browser
Google Chrome (12.0.725.0 dev)
OS
Mac OS X (10.6.6)
jsFiddle
Code
// onSuccess var onSuccess = function(data, textStatus, jqXHR) { alert(jqXHR.getAllResponseHeaders()); }; // AJAX request var request = { 'url': 'http://api.drinkwithabraham.com/', 'headers': { 'X-DwA-Source': 'web', 'Content-Type': 'application/json;charset=utf-8' }, 'type': 'GET', 'success': onSuccess }; // Send $.ajax(request);
Attachments (0)
Change History (4)
Changed April 11, 2011 01:13AM UTC by comment:1
component: | unfiled → ajax |
---|
Changed April 11, 2011 04:56AM UTC by comment:2
resolution: | → invalid |
---|---|
status: | new → closed |
Like timmywil said: it's getAllResponseHeaders, not getAllRequestHeaders ;)
Changed April 11, 2011 05:07AM UTC by comment:3
@ timmywil: Nope, see http://i.imgur.com/Eu8HY.png.
That looks like the only headers returned from the server: http://i.imgur.com/3A3xV.png
See the ajax request in firebug: http://jsfiddle.net/timmywil/tp4jS/1/