fixes bug 83465 "response with empty content-type opens helper dialog (telocity dsl modem/router)"

r=bbaetz, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@100451 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%netscape.com
2001-08-07 01:23:54 +00:00
parent 33ea2bfac7
commit 26e705bd56
2 changed files with 11 additions and 5 deletions

View File

@@ -493,12 +493,15 @@ nsHttpResponseHead::ParseVersion(const char *str)
nsresult
nsHttpResponseHead::ParseContentType(char *type)
{
char *p = PL_strchr(type, '(');
LOG(("nsHttpResponseHead::ParseContentType [type=%s]\n", type));
// don't bother with an empty content-type header - bug 83465
if (!*type)
return NS_OK;
// we don't care about comments (although they are invalid here)
char *p = PL_strchr(type, '(');
if (p)
// we don't care about comments (although they are invalid here)
*p = 0;
// check if the content-type has additional fields...

View File

@@ -912,10 +912,13 @@ nsMultiMixedConv::ParseHeaders(nsIChannel *aChannel, char *&aPtr,
nsresult
nsMultiMixedConv::ParseContentType(char *type)
{
char *p = PL_strchr(type, '(');
// don't bother with an empty content-type header - bug 83465
if (!*type)
return NS_OK;
// we don't care about comments (although they are invalid here)
char *p = PL_strchr(type, '(');
if (p)
// we don't care about comments (although they are invalid here)
*p = 0;
// check if the content-type has additional fields...