mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 306310 explicitly specify the charset (as UTF-8) for the about: channels
r+sr=darin
This commit is contained in:
parent
2f3c0b7029
commit
b4c780f6ed
@ -57,7 +57,8 @@ nsAboutBlank::NewChannel(nsIURI *aURI, nsIChannel **result)
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = NS_NewInputStreamChannel(&channel, aURI, in,
|
||||
NS_LITERAL_CSTRING("text/html"));
|
||||
NS_LITERAL_CSTRING("text/html"),
|
||||
NS_LITERAL_CSTRING("utf-8"));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
*result = channel;
|
||||
|
@ -148,7 +148,8 @@ nsAboutBloat::NewChannel(nsIURI *aURI, nsIChannel **result)
|
||||
|
||||
nsIChannel* channel;
|
||||
rv = NS_NewInputStreamChannel(&channel, aURI, inStr,
|
||||
NS_LITERAL_CSTRING("text/plain"));
|
||||
NS_LITERAL_CSTRING("text/plain"),
|
||||
NS_LITERAL_CSTRING("utf-8"));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
*result = channel;
|
||||
|
@ -148,7 +148,8 @@ nsAboutCache::NewChannel(nsIURI *aURI, nsIChannel **result)
|
||||
|
||||
nsIChannel* channel;
|
||||
rv = NS_NewInputStreamChannel(&channel, aURI, inStr,
|
||||
NS_LITERAL_CSTRING("text/html"));
|
||||
NS_LITERAL_CSTRING("text/html"),
|
||||
NS_LITERAL_CSTRING("utf-8"));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
*result = channel;
|
||||
|
@ -68,7 +68,8 @@ nsAboutCacheEntry::NewChannel(nsIURI *aURI, nsIChannel **result)
|
||||
|
||||
nsCOMPtr<nsIChannel> chan;
|
||||
rv = NS_NewInputStreamChannel(getter_AddRefs(chan), aURI, nsnull,
|
||||
NS_LITERAL_CSTRING("application/xhtml+xml"));
|
||||
NS_LITERAL_CSTRING("application/xhtml+xml"),
|
||||
NS_LITERAL_CSTRING("utf-8"));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
mStreamChannel = do_QueryInterface(chan, &rv);
|
||||
@ -476,7 +477,7 @@ nsAboutCacheEntry::WriteCacheEntryDescription(nsIOutputStream *outputStream,
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString filePath;
|
||||
cacheFile->GetPath(filePath);
|
||||
APPEND_ROW("file on disk", NS_ConvertUCS2toUTF8(filePath));
|
||||
APPEND_ROW("file on disk", NS_ConvertUTF16toUTF8(filePath));
|
||||
}
|
||||
else
|
||||
APPEND_ROW("file on disk", "none");
|
||||
|
Loading…
Reference in New Issue
Block a user