Opened 9 years ago
Closed 9 years ago
#15548 closed defect (fixed)
[regression][patch] dojo.xhr: content-type header is plaintext
Reported by: | liucougar | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | blocker | Milestone: | 1.8 |
Component: | IO | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
with dojo < 1.8, dojo.xhrPost({url:'someurl',content:{key:'value'}}) would set content-type to application/x-www-form-urlencoded
however, with current trunk, plain/text is set in FF, application/xml in IE
a possible fix is:
-
dojo/_base/xhr.js
593 593 var options = { 594 594 method: method, 595 595 handleAs: "text", 596 headers: args.headers,597 596 data: ioArgs.query, 598 597 timeout: args.timeout, 599 598 sync: args.sync, 600 599 withCredentials: args.withCredentials, 601 600 ioArgs: ioArgs 602 601 }; 602 if(args.headers){ 603 options.headers = args.headers; 604 } 603 605 604 606 dojo._ioNotifyStart(dfd); 605 607 try{
this is introduced with #15182
Change History (6)
comment:1 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|---|
Priority: | undecided → blocker |
comment:2 Changed 9 years ago by
Summary: | dojo.xhr regression: header is plaintext → [regression][patch] dojo.xhr: content-type header is plaintext |
---|
comment:3 Changed 9 years ago by
comment:4 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:6 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Good catch. Thanks, liucougar!
Note: See
TracTickets for help on using
tickets.
see #15552 for a test case