Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
WebServer: make sure status code is used for writeHead() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
ariya committed Dec 21, 2011
1 parent cd590f2 commit 56a5641
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/webserver.cpp
Expand Up @@ -269,6 +269,7 @@ void WebServerResponse::writeHead(int statusCode, const QVariantMap &headers)
///TODO: what is the best-practice error handling in javascript? exceptions?
Q_ASSERT(!m_headersSent);
m_headersSent = true;
m_statusCode = statusCode;
mg_printf(m_conn, "HTTP/1.1 %d %s\r\n", m_statusCode, responseCodeString(m_statusCode));
QVariantMap::const_iterator it = headers.constBegin();
while(it != headers.constEnd()) {
Expand Down

0 comments on commit 56a5641

Please sign in to comment.