mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 13:58:51 +03:00
Small optimization of WebUI responses when there isn't a data payload.
This commit is contained in:
parent
c284fd5412
commit
b909dd41c5
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ bool HttpResponseGenerator::gCompress(QByteArray &dest_buffer) {
|
|||
}
|
||||
|
||||
QByteArray HttpResponseGenerator::toByteArray() {
|
||||
if (m_gzip) {
|
||||
if (m_gzip && m_message.size() > 0) {// prevents writing a useless and wasteful header
|
||||
QByteArray dest_buf;
|
||||
if (gCompress(dest_buf)) {
|
||||
setValue("content-encoding", "gzip");
|
||||
|
|
Loading…
Reference in a new issue