Skip to main content

Bug Tracker

Side navigation

#8360 closed bug (fixed)

Opened February 23, 2011 09:53AM UTC

Closed February 23, 2011 11:02AM UTC

ajaxSend in version 1.5 no longer sets headers in requests

Reported by: abdulqadir.rashik@gmail.com Owned by:
Priority: low Milestone: 1.5.1
Component: ajax Version: 1.5
Keywords: Cc:
Blocked by: Blocking:
Description

Hi,

The ajaxSend method in version 1.5 does not set headers in the request using setRequestHeader

The same functionality is working fine in version 1.4.4

eg:

$('body').ajaxSend(function(evt, req, opt) {

req.setRequestHeader('X-User','anonymous');

}

);

The above code correctly sets a header called X-User using 1.4.4 but not in version 1.5

Attachments (0)
Change History (2)

Changed February 23, 2011 10:06AM UTC by abdulqadir.rashik@gmail.com comment:1

The code snippet in jsFiddle is at http://jsfiddle.net/Ptepx/1/

Changed February 23, 2011 11:02AM UTC by jitter comment:2

component: unfiledajax
milestone: 1.next1.5.1
priority: undecidedlow
resolution: → fixed
status: newclosed

Thanks for taking the time to contribute to the jQuery project by writing a bug report.

Sadly your jsFiddle isn't a test case it's just the same non functional code of piece you posted in the original report. I went ahead and made a working test case.

This was a bug in jQuery 1.5 that has already been fixed. You can verify that with my test case or by trying the current 1.5.1rc1 version. This fix will be included in the 1.5.1 release.

Changeset: cacea6f7e778d42cda56066a6b1da8fb163410cc