nsXMLHttpRequest should let you set the content-type

VERIFIED FIXED in mozilla0.9.4

Status

()

Core
XML
P2
normal
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: Garth Smedley, Assigned: Heikki Toivonen (remove -bugzilla when emailing directly))

Tracking

Trunk
mozilla0.9.4
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
Currently the content-type of the request sent by nsXMLHttpRequest::Send is
hard-coded to be text/xml in nsXMLHttpRequest::GetStreamForWString. The
nsXMLHttpRequest::SetRequestHeader method could be used to set the content type
if it weren't for the hard-coded  value. 

I have a patch which only sets the content type to text/xml if it hasn't already
been set. We are using this patch internally at OEone, but it would be nice to
have this in the main Mozilla source.
(Reporter)

Comment 1

17 years ago
Created attachment 42094 [details] [diff] [review]
Proposed patch to allow the content-type to be set
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: patch
r=heikki

I am not sure what would be the correct case for Content-Type, Content-Length
etc. headers; it seems different webservers give different case.

Will try to check this in for 0.9.4.
Priority: -- → P2
Target Milestone: --- → mozilla0.9.4

Updated

17 years ago
Keywords: oeone
sr=jst
Checked in.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 5

17 years ago
Since I 'm not exactly sure how to test this, I'm marking verified based on the
last comments

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.