Make setting contentType or contentCharset act as hints if done before channel
open; use this in the CSSLoader to hint that we want text/css data. Bug 120789, r=dougt, sr=darin git-svn-id: svn://10.0.0.236/trunk@144065 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -507,6 +507,9 @@ nsJARChannel::GetContentType(nsACString &result)
|
||||
NS_IMETHODIMP
|
||||
nsJARChannel::SetContentType(const nsACString &aContentType)
|
||||
{
|
||||
// If someone gives us a type hint we should just use that type instead of
|
||||
// doing our guessing. So we don't care when this is being called.
|
||||
|
||||
// mContentCharset is unchanged if not parsed
|
||||
NS_ParseContentType(aContentType, mContentType, mContentCharset);
|
||||
return NS_OK;
|
||||
@@ -515,6 +518,8 @@ nsJARChannel::SetContentType(const nsACString &aContentType)
|
||||
NS_IMETHODIMP
|
||||
nsJARChannel::GetContentCharset(nsACString &aContentCharset)
|
||||
{
|
||||
// If someone gives us a charset hint we should just use that charset.
|
||||
// So we don't care when this is being called.
|
||||
aContentCharset = mContentCharset;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user