#8837 closed bug (invalid)
jqXHR.getAllResponseHeaders() returns only ‘Content-Type’
Reported by: | 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 http://jsfiddle.net/tp4jS/
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);
Change History (4)
comment:1 Changed 12 years ago by
Component: | unfiled → ajax |
---|
comment:2 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Like timmywil said: it's getAllResponseHeaders, not getAllRequestHeaders ;)
Note: See
TracTickets for help on using
tickets.
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/