Skip to content

Commit

Permalink
Merge pull request #8 from zpearce/master
Browse files Browse the repository at this point in the history
Internet Explorer returns the blank line between the headers and the content in getAllResponseHeaders.
  • Loading branch information
alassek committed Jul 28, 2011
2 parents 34ef8bd + a0bc254 commit 2f2e4b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jquery.rest.js
Expand Up @@ -88,7 +88,9 @@
}

function get_headers(xhr) {
var headers = {}, stringHeaders = xhr.getAllResponseHeaders();
// trim the headers because IE likes to include the blank line between the headers
// and the content as part of the headers
var headers = {}, stringHeaders = trim.call(xhr.getAllResponseHeaders());
$.each(stringHeaders.split("\n"), function (i, header) {
if (header.length) {
var matches = header.match(/^([\w\-]+):(.*)/);
Expand Down

0 comments on commit 2f2e4b8

Please sign in to comment.