Browse Source

Reserve enough buffer space according to response content size

adaptive-webui-19844
Chocobo1 3 years ago
parent
commit
3c5688c6f6
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/base/http/responsegenerator.cpp

2
src/base/http/responsegenerator.cpp

@ -42,7 +42,7 @@ QByteArray Http::toByteArray(Response response) @@ -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…
Cancel
Save