mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-03 02:14:16 +00:00
Small optimization of WebUI responses when there isn't a data payload.
This commit is contained in:
parent
c284fd5412
commit
b909dd41c5
@ -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…
x
Reference in New Issue
Block a user