nitroshare / qhttpengine

HTTP server for Qt applications
MIT License
159 stars 76 forks source link

WriteHeaders() call is missing in function Socket::writeJson() #28

Open hexabyte23 opened 6 years ago

hexabyte23 commented 6 years ago

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(); }

zander commented 5 years ago

According to my test, the headers are written just fine, though.