mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 23:47:23 -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();
|
||||
|
||||
QByteArray buf;
|
||||
buf.reserve(10 * 1024);
|
||||
buf.reserve(1024 + response.content.length());
|
||||
|
||||
// Status Line
|
||||
buf += QString("HTTP/%1 %2 %3")
|
||||
|
||||
Reference in New Issue
Block a user