diff options
author | Chris Wilson <chris+github@qwirx.com> | 2009-01-05 00:49:34 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2009-01-05 00:49:34 +0000 |
commit | 5ec745e22e1693e5704ff8579f4b66dbea837447 (patch) | |
tree | 72396110c2b2b34b4e892f11e342e2054edfcc2d /lib/httpserver/HTTPServer.cpp | |
parent | fd7e746850372750efd42690aac25cbf32d9b5b4 (diff) |
Create HTTP responses with the stream that they will be sent to, for 100
Continue support.
Diffstat (limited to 'lib/httpserver/HTTPServer.cpp')
-rw-r--r-- | lib/httpserver/HTTPServer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/httpserver/HTTPServer.cpp b/lib/httpserver/HTTPServer.cpp index fbdadfa7..b8b02249 100644 --- a/lib/httpserver/HTTPServer.cpp +++ b/lib/httpserver/HTTPServer.cpp @@ -152,7 +152,7 @@ void HTTPServer::Connection(SocketStream &rStream) } // Generate a response - HTTPResponse response; + HTTPResponse response(&rStream); try { Handle(request, response); @@ -183,7 +183,7 @@ void HTTPServer::Connection(SocketStream &rStream) } // Send the response (omit any content if this is a HEAD method request) - response.Send(rStream, request.GetMethod() == HTTPRequest::Method_HEAD); + response.Send(request.GetMethod() == HTTPRequest::Method_HEAD); } // Notify derived claases @@ -209,7 +209,7 @@ void HTTPServer::SendInternalErrorResponse(const char *Error, SocketStream &rStr "</body>\n</html>\n" // Generate the error page - HTTPResponse response; + HTTPResponse response(&rStream); response.SetResponseCode(HTTPResponse::Code_InternalServerError); response.SetContentType("text/html"); response.Write(ERROR_HTML_1, sizeof(ERROR_HTML_1) - 1); @@ -217,7 +217,7 @@ void HTTPServer::SendInternalErrorResponse(const char *Error, SocketStream &rStr response.Write(ERROR_HTML_2, sizeof(ERROR_HTML_2) - 1); // Send the error response - response.Send(rStream); + response.Send(); } |