mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 11:37:43 -10:00
Bug 1541598 - Have FetchBody::SetMimeType convert from ByteStrings to UTF8 CStrings to not corrupt Unicode values; r=hsivonen
Have FetchBody::SetMimeType convert from ByteStrings to UTF8 CStrings to not corrupt Unicode values Differential Revision: https://phabricator.services.mozilla.com/D26011
This commit is contained in:
1 parent
b03ebaacad
commit
136622464a
2 files changed
+5258
-25335
No files matched your search
+2
-1
@@ -1187,7 +1187,8 @@ void FetchBody<Derived>::SetMimeType() {
|
||||
// HTTP ABNF states Content-Type may have only one value.
|
||||
// This is from the "parse a header value" of the fetch spec.
|
||||
if (!contentTypeValues.IsVoid() && contentTypeValues.Find(",") == -1) {
|
||||
mMimeType = contentTypeValues;
|
||||
// Convert from a bytestring to a UTF8 CString.
|
||||
CopyLatin1toUTF8(contentTypeValues, mMimeType);
|
||||
ToLowerCase(mMimeType);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user