From a54f89ea951a17679da6a0af51e496db986eaff9 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 5 Jan 2009 00:41:11 +0000 Subject: Add support for sending an HTTP/1.0 100 Continue response during processing of a request by HTTPServer, by keeping a pointer to the socket object. --- lib/httpserver/HTTPResponse.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/httpserver/HTTPResponse.h') diff --git a/lib/httpserver/HTTPResponse.h b/lib/httpserver/HTTPResponse.h index e4d4fd91..07838cb0 100644 --- a/lib/httpserver/HTTPResponse.h +++ b/lib/httpserver/HTTPResponse.h @@ -28,6 +28,7 @@ class IOStreamGetLine; class HTTPResponse : public CollectInBufferStream { public: + HTTPResponse(IOStream* pStreamToSendTo); HTTPResponse(); ~HTTPResponse(); @@ -46,7 +47,8 @@ public: void SetAsRedirect(const char *RedirectTo, bool IsLocalURI = true); void SetAsNotFound(const char *URI); - void Send(IOStream &rStream, bool OmitContent = false); + void Send(bool OmitContent = false); + void SendContinue(); void Receive(IOStream& rStream, int Timeout = IOStream::TimeOutInfinite); // void AddHeader(const char *EntireHeaderLine); @@ -139,6 +141,7 @@ private: std::string mContentType; std::vector
mExtraHeaders; int mContentLength; // only used when reading response from stream + IOStream* mpStreamToSendTo; // nonzero only when constructed with a stream static std::string msDefaultURIPrefix; -- cgit v1.2.3