QHttp2Configuration: remove setters/getter for indexing

Upon reading the Apple's documentation it would appear the indexing
is more complicated (they name the specific fields and which kind
of indexing must be applied to each). This requires a finer level
of configuration/control and probably a separate class (aka
QHpackConfiguration? ;). We'll provide it in future, if requested
by our users.

Fixes: QTBUG-77412
Change-Id: I6e9461b3966ed59c8b70873eab999a07a04eb289
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Timur Pocheptsov 2019-08-20 14:55:54 +02:00
parent fb462102b7
commit 4c6e549b25
2 changed files with 3 additions and 37 deletions

View File

@ -79,13 +79,9 @@ QT_BEGIN_NAMESPACE
frame. frame.
\endlist \endlist
The QHttp2Configuration class also controls some of the parameters The QHttp2Configuration class also controls if the header compression
affecting the header compression algorithm (HPACK). They include: algorithm (HPACK) is additionally using Huffman coding for string
compression.
\list
\li Huffman string compression.
\li Indexing strings.
\endlist
\note The configuration must be set before the first request \note The configuration must be set before the first request
was sent to a given host (and thus an HTTP/2 session established). was sent to a given host (and thus an HTTP/2 session established).
@ -112,7 +108,6 @@ public:
bool pushEnabled = false; bool pushEnabled = false;
// TODO: for now those two below are noop. // TODO: for now those two below are noop.
bool huffmanCompressionEnabled = true; bool huffmanCompressionEnabled = true;
bool indexingEnabled = true;
}; };
/*! /*!
@ -122,7 +117,6 @@ public:
\list \list
\li Server push is disabled \li Server push is disabled
\li Huffman string compression is enabled \li Huffman string compression is enabled
\li String indexing is enabled
\li Window size for connection-level flow control is 65535 octets \li Window size for connection-level flow control is 65535 octets
\li Window size for stream-level flow control is 65535 octets \li Window size for stream-level flow control is 65535 octets
\li Frame size is 16384 octets \li Frame size is 16384 octets
@ -211,30 +205,6 @@ bool QHttp2Configuration::huffmanCompressionEnabled() const
return d->huffmanCompressionEnabled; return d->huffmanCompressionEnabled;
} }
/*!
If \a enable is \c true, HPACK compression will index strings
in its dynamic compression table. Enabled by default.
\note This setting only has an affect on how QNetworkAccessManager
sending 'HEADERS' frames.
\sa stringIndexingEnabled
*/
void QHttp2Configuration::setStringIndexingEnabled(bool enable)
{
d->indexingEnabled = enable;
}
/*!
Returns \true if HPACK compression is indexing strings.
\sa setStringIndexingEnabled
*/
bool QHttp2Configuration::stringIndexingEnabled() const
{
return d->indexingEnabled;
}
/*! /*!
Sets the window size for connection-level flow control. Sets the window size for connection-level flow control.
\a size cannot be 0 and must not exceed 2147483647 octets. \a size cannot be 0 and must not exceed 2147483647 octets.
@ -335,7 +305,6 @@ bool operator==(const QHttp2Configuration &lhs, const QHttp2Configuration &rhs)
return lhs.d->pushEnabled == rhs.d->pushEnabled return lhs.d->pushEnabled == rhs.d->pushEnabled
&& lhs.d->huffmanCompressionEnabled == rhs.d->huffmanCompressionEnabled && lhs.d->huffmanCompressionEnabled == rhs.d->huffmanCompressionEnabled
&& lhs.d->indexingEnabled == rhs.d->indexingEnabled
&& lhs.d->sessionWindowSize == rhs.d->sessionWindowSize && lhs.d->sessionWindowSize == rhs.d->sessionWindowSize
&& lhs.d->streamWindowSize == rhs.d->streamWindowSize; && lhs.d->streamWindowSize == rhs.d->streamWindowSize;
} }

View File

@ -66,9 +66,6 @@ public:
void setHuffmanCompressionEnabled(bool enable); void setHuffmanCompressionEnabled(bool enable);
bool huffmanCompressionEnabled() const; bool huffmanCompressionEnabled() const;
void setStringIndexingEnabled(bool enable);
bool stringIndexingEnabled() const;
bool setSessionReceiveWindowSize(unsigned size); bool setSessionReceiveWindowSize(unsigned size);
unsigned sessionReceiveWindowSize() const; unsigned sessionReceiveWindowSize() const;