Closed Bug 1896929 Opened 5 months ago Closed 5 months ago

Allow nsInputStreamChannel to have an arbitrary content type set on it

Categories

(Core :: Networking, task, P2)

task

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

Details

(Whiteboard: [fidefe-device-migration][necko-triaged])

Attachments

(1 file)

nsInputStreamChannel inherits from nsBaseChannel, meaning that it inherits the nsBaseChannel SetContentType method. That method parses the passed in content type with net_ParseContentType here, and this means that anything after a ; will be truncated from the content type.

I'd like to propose that we override the SetContentType method to skip this parsing / truncation. The reason for this is that I'd like to feed an nsIInputStream into the multipart/mixed stream converter (which only accepts an nsIChannel as its source of bytes), and the multipart/mixed stream converter expects the content type to include boundary information after the MIME type.

Assignee: nobody → mconley

This allows us to craft an nsIInputStreamChannel that can be used with the
multipart/mixed stream converter.

Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/248b14f05067 Allow nsInputStreamChannel to have an arbitrary content type set on it. r=valentin,necko-reviewers
Severity: -- → S3
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [fidefe-device-migration] → [fidefe-device-migration][necko-triaged]
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
Regressions: 1914250
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: