qhttpengine
qhttpengine copied to clipboard
WriteHeaders() call is missing in function Socket::writeJson()
void Socket::writeJson(const QJsonDocument &document, int statusCode) { QByteArray data = document.toJson(); setStatusCode(statusCode); setHeader("Content-Length", QByteArray::number(data.length())); setHeader("Content-Type", "application/json"); writeHeaders(); write(data); close(); }
According to my test, the headers are written just fine, though.