fix bug 50864. remove umr r=nhotta

This commit is contained in:
ftang%netscape.com 2000-09-14 23:10:06 +00:00
parent 288d5211f1
commit 5e13bf880f

View File

@ -245,13 +245,18 @@ NS_IMETHODIMP nsMetaCharsetObserver::Notify(
}
static nsAutoString contenttype = NS_ConvertToString("Content-Type");
static nsAutoString texthtml = NS_ConvertToString("text/html");
PRInt32 lastIdx =0;
if(nsnull != httpEquivValue)
lastIdx = nsCRT::strlen(httpEquivValue)-1;
if((nsnull != httpEquivValue) &&
(nsnull != contentValue) &&
((0==nsCRT::strcasecmp(httpEquivValue,contenttype.GetUnicode())) ||
((((httpEquivValue[0]=='\'') &&
(httpEquivValue[contenttype.Length()+1]=='\'')) ||
(httpEquivValue[lastIdx]=='\'')) ||
((httpEquivValue[0]=='\"') &&
(httpEquivValue[contenttype.Length()+1]=='\"'))) &&
(httpEquivValue[lastIdx]=='\"'))) &&
(0==nsCRT::strncasecmp(httpEquivValue+1,
contenttype.GetUnicode(),
contenttype.Length()))