http2: skip content-length for content-encoding: gzip/deflate
The protocol handler now matches HTTP/1.1's protocol handler. Change-Id: Id55c10900e2bcd46e5dc65c63db77097eb4818b6 Fixes: QTBUG-73364 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>bb10
parent
72b9574227
commit
c306fdff77
|
|
@ -1056,6 +1056,7 @@ void QHttp2ProtocolHandler::updateStream(Stream &stream, const HPack::HttpHeader
|
|||
Qt::ConnectionType connectionType)
|
||||
{
|
||||
const auto httpReply = stream.reply();
|
||||
const auto &httpRequest = stream.request();
|
||||
Q_ASSERT(httpReply || stream.state == Stream::remoteReserved);
|
||||
|
||||
if (!httpReply) {
|
||||
|
|
@ -1115,6 +1116,9 @@ void QHttp2ProtocolHandler::updateStream(Stream &stream, const HPack::HttpHeader
|
|||
if (QHttpNetworkReply::isHttpRedirect(statusCode) && redirectUrl.isValid())
|
||||
httpReply->setRedirectUrl(redirectUrl);
|
||||
|
||||
if (httpReplyPrivate->isCompressed() && httpRequest.d->autoDecompress)
|
||||
httpReplyPrivate->removeAutoDecompressHeader();
|
||||
|
||||
if (QHttpNetworkReply::isHttpRedirect(statusCode)
|
||||
|| statusCode == 401 || statusCode == 407) {
|
||||
// These are the status codes that can trigger uploadByteDevice->reset()
|
||||
|
|
|
|||
Loading…
Reference in New Issue