Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#8297 closed bug (fixed)

jQuery 1.5 getResponseHeader IE

Reported by: [email protected] Owned by: jaubourg
Priority: blocker Milestone: 1.5.1
Component: ajax Version: 1.5
Keywords: Cc:
Blocked by: Blocking:


With the new upgrade to 1.5, the XMLHttpRequest has been wrapped with a new JQuery object (jqXHR).

In IE (IE7 for sure) if a response header is returned with only a key, and no value, the new upgrade takes the next key/value pair and uses that for its value.

Example of a response header:


Key-2: Testing

Key-3: Testing 2

In IE7, if the we call the request header

var value1 = jqXHR.getResponseHeader("Key-1");

var value2 = jqXHR.getResponseHeader("Key-2");

var value3 = jqXHR.getResponseHeader("Key-3");

value1's value will actually be "Key-2: Testing". value2 will be empty or null. value3's value will be "Testing 2"

This is a fairly large defect.

Change History (2)

comment:1 Changed 12 years ago by jitter

Component: unfiledajax
Milestone: 1.next1.5.1
Owner: set to jaubourg
Priority: undecidedblocker
Status: newassigned


According to RFC2616 4.2 and RFC0822 3.2 empty headers are valid. This looks like a serious bug in the rheaders regex in ajax.js

comment:2 Changed 12 years ago by jaubourg

Resolution: fixed
Status: assignedclosed

Fixes #8297. Makes sure response headers with empty values are handled properly and do not prevent proper parsing of the entire response headers string. Unit test amended.

Changeset: 5b38439011799ae53156d137305d9440e0cddb0a

Note: See TracTickets for help on using tickets.