QHttp2Configuration - respect the value returned by huffmanCompressionEnabled()

And either compress or not.

Task-number: QTBUG-77412
Change-Id: I3b09385d2b3caf4f7de0455ad6e22c0f068c33a9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Timur Pocheptsov 2019-08-20 14:49:37 +02:00
parent 1b9274573e
commit fb462102b7
3 changed files with 7 additions and 0 deletions

View File

@ -208,6 +208,11 @@ void Encoder::setMaxDynamicTableSize(quint32 size)
lookupTable.setMaxDynamicTableSize(size);
}
void Encoder::setCompressStrings(bool compress)
{
compressStrings = compress;
}
bool Encoder::encodeRequestPseudoHeaders(BitOStream &outputStream,
const HttpHeader &header)
{

View File

@ -83,6 +83,7 @@ public:
quint32 newSize);
void setMaxDynamicTableSize(quint32 size);
void setCompressStrings(bool compress);
private:
bool encodeRequestPseudoHeaders(BitOStream &outputStream,

View File

@ -179,6 +179,7 @@ QHttp2ProtocolHandler::QHttp2ProtocolHandler(QHttpNetworkConnectionChannel *chan
maxSessionReceiveWindowSize = h2Config.sessionReceiveWindowSize();
pushPromiseEnabled = h2Config.serverPushEnabled();
streamInitialReceiveWindowSize = h2Config.streamReceiveWindowSize();
encoder.setCompressStrings(h2Config.huffmanCompressionEnabled());
if (!channel->ssl && m_connection->connectionType() != QHttpNetworkConnection::ConnectionTypeHTTP2Direct) {
// We upgraded from HTTP/1.1 to HTTP/2. channel->request was already sent