Use the new MimeType parser to parse content-types for response headers
Categories
(Core :: Networking, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox123 | --- | fixed |
People
(Reporter: twisniewski, Assigned: dotoole)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [necko-triaged][necko-priority-queue])
Attachments
(1 file)
We should be able to pass the mimesniff/mime-types/charset-parameter.window.html WPTs if we use our new MIMEType parser here:
We could also pass a lot of the other MimeSniff tests by using it for blob content types, but unfortunately those tests conflict with the File spec (because the File spec expects blobs to only be lowercased and rejected if they have non-ASCII characters, while the MimeSniffing spec seems to expect them to be normalized, as if parsed and then serialized).
Reporter | ||
Updated•1 year ago
|
Reporter | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
net_ParseContentType(val, mContentType, mContentCharset, &dummy);
We need to do something like this:
https://searchfox.org/mozilla-central/rev/503938c13ef2dd174705dc0f6d0683ae43074ccc/netwerk/protocol/data/nsDataHandler.cpp#187-194
if (mozilla::UniquePtr<CMimeType> parsed = CMimeType::Parse(mimeType)) {
parsed->GetFullType(aContentType);
if (aContentCharset) {
parsed->GetParameterValue(kCharset, *aContentCharset);
}
if (aMimeType) {
parsed->Serialize(*aMimeType);
}
Reporter | ||
Comment 2•1 year ago
|
||
Note that I actually have a patch in the works here already, but there were still try-failures I haven't accounted for: https://treeherder.mozilla.org/jobs?repo=try&revision=356a369dc72bbecb6f0a525ad7c2dca464a33f27
Comment 5•11 months ago
|
||
Backed out changeset 433e82386c67 (Bug 1847659) for causing failures in script.window.html CLOSED TREE
Log: https://treeherder.mozilla.org/logviewer?job_id=441064175&repo=autoland&lineNumber=17113
Backout: https://hg.mozilla.org/integration/autoland/rev/eaabad4dd002ccbc4b5b3ec02071512d09b7f22c
Comment 7•11 months ago
|
||
bugherder |
Description
•