Bug Tracker

Opened 15 years ago

Closed 12 years ago

Last modified 11 years ago

#2960 closed bug (fixed)

jQuery sends wrong content type to server on ajax post requests if data is {}

Reported by: barushev Owned by:
Priority: major Milestone: 1.4.3
Component: ajax Version: 1.2.5
Keywords: content-type Cc:
Blocked by: Blocking:


Small testcase:


no Content-Type and Content-Length headers
$.post('/index', null)

no Content-Type and Content-Length headers
$.post('/index', {'test': 'test'})

Content-Type	application/x-www-form-urlencoded
Content-Length	9
$.post('/index', {})

Content-Length	0
Content-Type	application/xml
$.post('/index', function () {})

Content-Length	0
Content-Type	application/xml

It's wrong Content-type application/xml in last two exaples.


Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080419 Ubuntu/8.04 (hardy) Firefox/

Change History (2)

comment:1 Changed 13 years ago by dmethvin


comment:2 Changed 12 years ago by dmethvin

Resolution: fixed
Status: newclosed

I think the final problems should have been fixed for 1.4.3 in this commit:


Note: See TracTickets for help on using tickets.