Opened 6 years ago

Closed 6 years ago

#17687 closed defect (fixed)

[patch][cla] dojo/request/xhr sets the Content-Type to application/x-www-form-urlencoded even when FormData is used

Reported by: lakin.wecker Owned by: dylan
Priority: high Milestone: 1.10
Component: IO Version: 1.9.2
Keywords: Cc:
Blocked By: Blocking:

Description

FormData?, by default will produce a multipart/form-data encoded body for the request. When someone provides an instance of FormData? to dojo/request/xhr - you shouldn't set the content-type to allow the browser to produce the appropriate multipart/form-data Content-Type header.

To work around this for now, the user must explicitly set: {{{ headers: {

'Content-Type': false

} }}}

Change History (6)

comment:1 Changed 6 years ago by bill

Component: GeneralIO
Owner: set to Bryan Forbes
Status: newassigned

comment:2 Changed 6 years ago by Bryan Forbes

Milestone: tbd1.10
Priority: undecidedhigh

comment:3 Changed 6 years ago by dylan

Owner: changed from Bryan Forbes to dylan

Discussed this with Bryan Forbes, I will work on a pull request for this.

comment:5 Changed 6 years ago by dylan

Summary: dojo/request/xhr sets the Content-Type to application/x-www-form-urlencoded even when FormData is used[patch][cla] dojo/request/xhr sets the Content-Type to application/x-www-form-urlencoded even when FormData is used

comment:6 Changed 6 years ago by dylans <dylan@…>

Resolution: fixed
Status: assignedclosed

In 7a7a0974ee9d88e643d37968f3dad483786eb69b/dojo:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.