mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 18:56:08 +03:00
Reserve enough buffer space according to response content size
This commit is contained in:
parent
ece92a886a
commit
3c5688c6f6
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ QByteArray Http::toByteArray(Response response)
|
|||
response.headers[HEADER_DATE] = httpDate();
|
||||
|
||||
QByteArray buf;
|
||||
buf.reserve(10 * 1024);
|
||||
buf.reserve(1024 + response.content.length());
|
||||
|
||||
// Status Line
|
||||
buf += QString("HTTP/%1 %2 %3")
|
||||
|
|
Loading…
Reference in a new issue