diff options
author | Mattes D <github@xoft.cz> | 2015-04-19 17:32:44 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-04-19 17:32:44 +0200 |
commit | d40078d163036fbc2207bf2f5a9fbf7eeaa44fc1 (patch) | |
tree | 5c6962d3859ac3dcf67a288d59dfc05ed5859323 /src/HTTPServer/HTTPConnection.cpp | |
parent | Merge pull request #1864 from mc-server/StrictRecipeMatching (diff) | |
download | cuberite-d40078d163036fbc2207bf2f5a9fbf7eeaa44fc1.tar cuberite-d40078d163036fbc2207bf2f5a9fbf7eeaa44fc1.tar.gz cuberite-d40078d163036fbc2207bf2f5a9fbf7eeaa44fc1.tar.bz2 cuberite-d40078d163036fbc2207bf2f5a9fbf7eeaa44fc1.tar.lz cuberite-d40078d163036fbc2207bf2f5a9fbf7eeaa44fc1.tar.xz cuberite-d40078d163036fbc2207bf2f5a9fbf7eeaa44fc1.tar.zst cuberite-d40078d163036fbc2207bf2f5a9fbf7eeaa44fc1.zip |
Diffstat (limited to 'src/HTTPServer/HTTPConnection.cpp')
-rw-r--r-- | src/HTTPServer/HTTPConnection.cpp | 4 |
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; } |