[Box Backup-commit] COMMIT r2440 - box/trunk/lib/httpserver
boxbackup-dev@boxbackup.org
boxbackup-dev@boxbackup.org
Mon, 5 Jan 2009 00:49:34 +0000 (GMT)
Author: chris
Date: 2009-01-05 00:49:34 +0000 (Mon, 05 Jan 2009)
New Revision: 2440
Modified:
box/trunk/lib/httpserver/HTTPServer.cpp
box/trunk/lib/httpserver/HTTPServer.h
Log:
Create HTTP responses with the stream that they will be sent to, for 100
Continue support.
Modified: box/trunk/lib/httpserver/HTTPServer.cpp
===================================================================
--- box/trunk/lib/httpserver/HTTPServer.cpp 2009-01-05 00:48:33 UTC (rev 2439)
+++ box/trunk/lib/httpserver/HTTPServer.cpp 2009-01-05 00:49:34 UTC (rev 2440)
@@ -152,7 +152,7 @@
}
// Generate a response
- HTTPResponse response;
+ HTTPResponse response(&rStream);
try
{
Handle(request, response);
@@ -183,7 +183,7 @@
}
// 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 @@
"</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 @@
response.Write(ERROR_HTML_2, sizeof(ERROR_HTML_2) - 1);
// Send the error response
- response.Send(rStream);
+ response.Send();
}
Modified: box/trunk/lib/httpserver/HTTPServer.h
===================================================================
--- box/trunk/lib/httpserver/HTTPServer.h 2009-01-05 00:48:33 UTC (rev 2439)
+++ box/trunk/lib/httpserver/HTTPServer.h 2009-01-05 00:49:34 UTC (rev 2440)
@@ -46,7 +46,7 @@
// Created: 26/3/04
//
// --------------------------------------------------------------------------
- virtual void Handle(const HTTPRequest &rRequest, HTTPResponse &rResponse) = 0;
+ virtual void Handle(HTTPRequest &rRequest, HTTPResponse &rResponse) = 0;
// For notifications to derived classes
virtual void HTTPConnectionOpening();