diff --git a/mozilla/netwerk/protocol/http/src/nsHttpHeaderArray.cpp b/mozilla/netwerk/protocol/http/src/nsHttpHeaderArray.cpp index fcfe82ae3cc..195b1b0ef39 100644 --- a/mozilla/netwerk/protocol/http/src/nsHttpHeaderArray.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHttpHeaderArray.cpp @@ -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 || diff --git a/mozilla/netwerk/protocol/http/src/nsHttpTransaction.cpp b/mozilla/netwerk/protocol/http/src/nsHttpTransaction.cpp index 17b2c03d2bc..210a2a614a5 100644 --- a/mozilla/netwerk/protocol/http/src/nsHttpTransaction.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHttpTransaction.cpp @@ -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; }