summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-05 21:52:14 +0200
committermadmaxoft <github@xoft.cz>2013-10-05 21:52:14 +0200
commit2b8bddbdc315abf109c9767025448d64cb5c8224 (patch)
treebdac9efa441f0c4b24cde35818df24d728e9ccae /source
parentAdded Basic auth support to cHTTPRequest. (diff)
downloadcuberite-2b8bddbdc315abf109c9767025448d64cb5c8224.tar
cuberite-2b8bddbdc315abf109c9767025448d64cb5c8224.tar.gz
cuberite-2b8bddbdc315abf109c9767025448d64cb5c8224.tar.bz2
cuberite-2b8bddbdc315abf109c9767025448d64cb5c8224.tar.lz
cuberite-2b8bddbdc315abf109c9767025448d64cb5c8224.tar.xz
cuberite-2b8bddbdc315abf109c9767025448d64cb5c8224.tar.zst
cuberite-2b8bddbdc315abf109c9767025448d64cb5c8224.zip
Diffstat (limited to 'source')
-rw-r--r--source/HTTPServer/HTTPConnection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/HTTPServer/HTTPConnection.cpp b/source/HTTPServer/HTTPConnection.cpp
index e3a6be494..2addf4cfc 100644
--- a/source/HTTPServer/HTTPConnection.cpp
+++ b/source/HTTPServer/HTTPConnection.cpp
@@ -24,7 +24,7 @@ cHTTPConnection::cHTTPConnection(cHTTPServer & a_HTTPServer) :
void cHTTPConnection::SendStatusAndReason(int a_StatusCode, const AString & a_Response)
{
- AppendPrintf(m_OutgoingData, "%d %s\r\n\r\n", a_StatusCode, a_Response.c_str());
+ AppendPrintf(m_OutgoingData, "%d %s\r\nContent-Length: 0\r\n\r\n", a_StatusCode, a_Response.c_str());
m_HTTPServer.NotifyConnectionWrite(*this);
m_State = wcsRecvHeaders;
}
@@ -35,7 +35,7 @@ void cHTTPConnection::SendStatusAndReason(int a_StatusCode, const AString & a_Re
void cHTTPConnection::SendNeedAuth(const AString & a_Realm)
{
- AppendPrintf(m_OutgoingData, "HTTP/1.1 401 Unauthorized\r\nWWW-Authenticate: Basic realm=\"%s\"\r\n\r\n", a_Realm.c_str());
+ AppendPrintf(m_OutgoingData, "HTTP/1.1 401 Unauthorized\r\nWWW-Authenticate: Basic realm=\"%s\"\r\nContent-Length: 0\r\n\r\n", a_Realm.c_str());
m_HTTPServer.NotifyConnectionWrite(*this);
m_State = wcsRecvHeaders;
}