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:
bzbarsky%mit.edu
2003-06-23 21:00:46 +00:00
parent 90d450743a
commit fe3f1277a3
18 changed files with 189 additions and 104 deletions

View File

@@ -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;
}