mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-16 21:11:50 +03:00
Fix "Content-Encoding" header is always created.
Was side effect of operator[]
This commit is contained in:
parent
7d36c81949
commit
129172453b
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
QByteArray Http::toByteArray(Response response)
|
QByteArray Http::toByteArray(Response response)
|
||||||
{
|
{
|
||||||
if (response.headers[HEADER_CONTENT_ENCODING] == "gzip") {
|
if (response.headers.value(HEADER_CONTENT_ENCODING) == "gzip") {
|
||||||
// A gzip seems to have 23 bytes overhead.
|
// A gzip seems to have 23 bytes overhead.
|
||||||
// Also "Content-Encoding: gzip\r\n" is 26 bytes long
|
// Also "Content-Encoding: gzip\r\n" is 26 bytes long
|
||||||
// So we only benefit from gzip if the message is bigger than 23+26 = 49
|
// So we only benefit from gzip if the message is bigger than 23+26 = 49
|
||||||
|
|
Loading…
Reference in a new issue