summaryrefslogtreecommitdiffstats
path: root/src/HTTPServer/HTTPConnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/HTTPServer/HTTPConnection.cpp')
-rw-r--r--src/HTTPServer/HTTPConnection.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/HTTPServer/HTTPConnection.cpp b/src/HTTPServer/HTTPConnection.cpp
index de12b36ce..a5c6afd18 100644
--- a/src/HTTPServer/HTTPConnection.cpp
+++ b/src/HTTPServer/HTTPConnection.cpp
@@ -38,7 +38,9 @@ cHTTPConnection::~cHTTPConnection()
void cHTTPConnection::SendStatusAndReason(int a_StatusCode, const AString & a_Response)
{
- SendData(Printf("%d %s\r\nContent-Length: 0\r\n\r\n", a_StatusCode, a_Response.c_str()));
+ SendData(Printf("HTTP/1.1 %d %s\r\n", a_StatusCode, a_Response.c_str()));
+ SendData(Printf("Content-Length: %u\r\n\r\n", static_cast<unsigned>(a_Response.size())));
+ SendData(a_Response.data(), a_Response.size());
m_State = wcsRecvHeaders;
}