Closed Bug 90530 Opened 23 years ago Closed 23 years ago

nsXMLHttpRequest should let you set the content-type

Categories

(Core :: XML, defect, P2)

x86
Linux
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.4

People

(Reporter: gsmedley, Assigned: hjtoi-bugzilla)

Details

Attachments

(1 file)

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.
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
Keywords: oeone
sr=jst
Checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
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.

Attachment

General

Creator:
Created:
Updated:
Size: