mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
Reserve enough buffer space according to response content size
This commit is contained in:
@@ -42,7 +42,7 @@ QByteArray Http::toByteArray(Response response)
|
|||||||
response.headers[HEADER_DATE] = httpDate();
|
response.headers[HEADER_DATE] = httpDate();
|
||||||
|
|
||||||
QByteArray buf;
|
QByteArray buf;
|
||||||
buf.reserve(10 * 1024);
|
buf.reserve(1024 + response.content.length());
|
||||||
|
|
||||||
// Status Line
|
// Status Line
|
||||||
buf += QString("HTTP/%1 %2 %3")
|
buf += QString("HTTP/%1 %2 %3")
|
||||||
|
|||||||
Reference in New Issue
Block a user