mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
Always send Content-Length header.
Because without it, HTTP/1.1 (with persistence connection) clients will keep waiting for more data.
This commit is contained in:
parent
0b28fb6c6b
commit
9496b2a159
1 changed files with 1 additions and 2 deletions
|
@ -48,7 +48,6 @@ QByteArray ResponseGenerator::generate(Response response)
|
||||||
response.headers.remove(HEADER_CONTENT_ENCODING);
|
response.headers.remove(HEADER_CONTENT_ENCODING);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.content.length() > 0)
|
|
||||||
response.headers[HEADER_CONTENT_LENGTH] = QString::number(response.content.length());
|
response.headers[HEADER_CONTENT_LENGTH] = QString::number(response.content.length());
|
||||||
|
|
||||||
QString ret(QLatin1String("HTTP/1.1 %1 %2\r\n%3\r\n"));
|
QString ret(QLatin1String("HTTP/1.1 %1 %2\r\n%3\r\n"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue