Bug 1437693 - Stop warning about unknown content lengths. r=bkelly

--HG--
extra : rebase_source : 943658882837ad790542231634d2a24c21906094
This commit is contained in:
Eric Rahm 2018-02-12 14:54:14 -08:00
Родитель 87736606f3
Коммит 3efc420b11
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -851,8 +851,9 @@ FetchDriver::OnStartRequest(nsIRequest* aRequest,
ErrorResult result;
if (response->Headers()->Has(NS_LITERAL_CSTRING("content-encoding"), result) ||
response->Headers()->Has(NS_LITERAL_CSTRING("transfer-encoding"), result)) {
NS_WARNING("Cannot know response Content-Length due to presence of Content-Encoding "
"or Transfer-Encoding headers.");
// We cannot trust the content-length when content-encoding or
// transfer-encoding are set. There are many servers which just
// get this wrong.
contentLength = InternalResponse::UNKNOWN_BODY_SIZE;
}
MOZ_ASSERT(!result.Failed());