#14993 closed defect (fixed)
Content-Type is repeated when using dojo.xhr
Reported by: | Randy Hudson | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8 |
Component: | IO | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Here's a snippet showing the bug:
var args = {
url: '/foo', headers: {'content-type': 'text/plain'}
}; dojo.xhrGet(args); args.url = '/bar'; dojo.xhrGet(args);
In the second call to xhrGet, the outgoing request has header:
content-type:text/plain, text/plain
The first call to xhrGet is corrupting the args, causing the second call to have the problem.
Change History (3)
comment:1 Changed 9 years ago by
comment:2 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This was fixed when dojo/request
was written.
comment:3 Changed 7 years ago by
Milestone: | tbd → 1.8 |
---|
Note: See
TracTickets for help on using
tickets.
Here's the problematic code in xhr.js:
A variable should be used instead of modifying the caller's args.