mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-16 05:01:37 +03: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,8 +48,7 @@ QByteArray ResponseGenerator::generate(Response response)
|
|||
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"));
|
||||
|
||||
|
|
Loading…
Reference in a new issue