Opened 8 years ago

Closed 8 years ago

#12141 closed defect (fixed)

Provide a way to not include Content-Type header on an XHR

Reported by: rmurphey Owned by: Kenneth G. Franqueiro
Priority: high Milestone: 1.7
Component: General Version: 1.5
Keywords: Cc: rmurphey
Blocked By: Blocking:

Description

There is currently no way to not send a Content-Type header with an XHR; it is set to "application/x-www-form-urlencoded" if one is not specified in the ioArgs.

This became a problem for me because the s3 hash our application uses does not expect the Content-Type header to be there by default. While I can see the benefit of specifying something by default, as of 1.5 there is no way to choose whether the header is present at all.

Attachments (2)

xhr-content-type.diff (1.2 KB) - added by rmurphey 8 years ago.
Allow specifying no Content-Type on XHR
xhr25325.diff (1.0 KB) - added by Kenneth G. Franqueiro 8 years ago.
Same changes as original diff, applied as of r25325.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by dante

Cc: rmurphey added; rmurphey@… removed
Milestone: tbd1.6
Owner: changed from anonymous to dante

+1, might not be able to sneak into 1.6 though, bit late. I'll set the milestone to 1.6 and see if anyone notices/complains.

Changed 8 years ago by rmurphey

Attachment: xhr-content-type.diff added

Allow specifying no Content-Type on XHR

comment:2 Changed 8 years ago by rmurphey

Patch with docs attached.

comment:3 Changed 8 years ago by dante

Milestone: 1.61.7

Changed 8 years ago by Kenneth G. Franqueiro

Attachment: xhr25325.diff added

Same changes as original diff, applied as of r25325.

comment:4 Changed 8 years ago by dante

Owner: changed from dante to Kenneth G. Franqueiro

+1

comment:5 Changed 8 years ago by Kenneth G. Franqueiro

Resolution: fixed
Status: newclosed

(In [25326]) Fixes #12141 - Allow specifying contentType:false to not send Content-Type header in dojo.xhr* functions. Special thanks to rmurphey for the patch; projectile vegetables of varying degrees of ripeness in dante's general direction for slacking on it.

Note: See TracTickets for help on using tickets.