mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 09:55:55 +00:00
Reserve enough buffer space according to response content size
This commit is contained in:
parent
ece92a886a
commit
3c5688c6f6
@ -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…
x
Reference in New Issue
Block a user