Side navigation
#2960 closed bug (fixed)
Opened May 29, 2008 10:04PM UTC
Closed September 28, 2010 11:57PM UTC
Last modified March 14, 2012 04:54PM UTC
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: |
Description
Small testcase:
$.post('/index')
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:1.8.1.14) Gecko/20080419 Ubuntu/8.04 (hardy) Firefox/2.0.0.14
Attachments (0)
Change History (2)
Changed June 15, 2010 02:30AM UTC by comment:1
| milestone: | 1.3 → 1.4.3 |
|---|
Changed September 28, 2010 11:57PM UTC by comment:2
| resolution: | → fixed |
|---|---|
| status: | new → closed |
I think the final problems should have been fixed for 1.4.3 in this commit:
http://github.com/jquery/jquery/commit/c4e653237f258ce618ad5a9ec677917166fbed16