mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Fixes bug 88792 "redirection with no final \r\n not processed"
r=bbaetz, sr=dougt
This commit is contained in:
parent
0c171e8c5e
commit
1b21109960
@ -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 ||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user