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:
@@ -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...
|
||||
|
||||
@@ -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...
|
||||
|
||||
Reference in New Issue
Block a user