fixes bug 330214 "Ignore Transfer-Encoding header sent with HTTP/1.0 response" r=biesi sr=bzbarsky

This commit is contained in:
darin%meer.net 2006-04-05 02:09:41 +00:00
Родитель aa72ac0422
Коммит d433d4ef1e
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -775,7 +775,9 @@ nsHttpTransaction::HandleContentStart()
// we're done with the socket. please note that _all_ other // we're done with the socket. please note that _all_ other
// decoding is done when the channel receives the content data // decoding is done when the channel receives the content data
// so as not to block the socket transport thread too much. // so as not to block the socket transport thread too much.
if (mResponseHead->HasHeaderValue(nsHttp::Transfer_Encoding, "chunked")) { // ignore chunked responses from HTTP/1.0 servers and proxies.
if (mResponseHead->Version() >= NS_HTTP_VERSION_1_1 &&
mResponseHead->HasHeaderValue(nsHttp::Transfer_Encoding, "chunked")) {
// we only support the "chunked" transfer encoding right now. // we only support the "chunked" transfer encoding right now.
mChunkedDecoder = new nsHttpChunkedDecoder(); mChunkedDecoder = new nsHttpChunkedDecoder();
if (!mChunkedDecoder) if (!mChunkedDecoder)