Fixes bug 88792 "redirection with no final \r\n not processed"

r=bbaetz, sr=dougt
This commit is contained in:
darin%netscape.com 2001-08-02 19:28:08 +00:00
parent 0c171e8c5e
commit 1b21109960
2 changed files with 8 additions and 0 deletions

View File

@ -156,6 +156,7 @@ PRBool
nsHttpHeaderArray::CanAppendToHeader(nsHttpAtom header)
{
return header == nsHttp::Accept_Charset ||
header == nsHttp::Content_Type ||
header == nsHttp::User_Agent ||
header == nsHttp::Referer ||
header == nsHttp::Host ||

View File

@ -736,6 +736,13 @@ nsHttpTransaction::Read(char *buf, PRUint32 count, PRUint32 *bytesWritten)
// return would block to prevent being called again.
return NS_BASE_STREAM_WOULD_BLOCK;
}
if (!mHaveAllHeaders && !mLineBuf.IsEmpty()) {
// the server has not sent the final \r\n terminating the header section,
// and there is still a header line unparsed. let's make sure we parse
// the remaining header line, and then hopefully, the response will be
// usable (see bug 88792).
ParseLineSegment("\n", 1);
}
return rv;
}