author | Neil Rashbrook <neil@parkwaycc.co.uk> |
Sat, 02 Mar 2013 14:23:20 +0000 | |
changeset 123566 | 1cd1a9fdf8fba4c777b4cb044cad1641c0186010 |
parent 123565 | 7d93ba84ce2f3718173b98978ee5876bd1650e6f |
child 123567 | fbdbdebeb0dd51c0b949244edef9e38916d27984 |
push id | 24385 |
push user | gszorc@mozilla.com |
push date | Sat, 02 Mar 2013 21:28:09 +0000 |
treeherder | mozilla-central@0f0745beec38 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bz |
bugs | 738952 |
milestone | 22.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
content/base/src/nsDocument.cpp | file | annotate | diff | comparison | revisions | |
mach | file | annotate | diff | comparison | revisions |
--- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -2255,17 +2255,20 @@ nsDocument::StartDocumentLoad(const char mHaveInputEncoding = true; if (aReset) { Reset(aChannel, aLoadGroup); } nsAutoCString contentType; - if (NS_SUCCEEDED(aChannel->GetContentType(contentType))) { + nsCOMPtr<nsIPropertyBag2> bag = do_QueryInterface(aChannel); + if ((bag && NS_SUCCEEDED(bag->GetPropertyAsACString( + NS_LITERAL_STRING("contentType"), contentType))) || + NS_SUCCEEDED(aChannel->GetContentType(contentType))) { // XXX this is only necessary for viewsource: nsACString::const_iterator start, end, semicolon; contentType.BeginReading(start); contentType.EndReading(end); semicolon = start; FindCharInReadable(';', semicolon, end); SetContentTypeInternal(Substring(start, semicolon)); }