summaryrefslogtreecommitdiff
path: root/lib/httpserver/HTTPResponse.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2009-01-05 00:41:11 +0000
committerChris Wilson <chris+github@qwirx.com>2009-01-05 00:41:11 +0000
commita54f89ea951a17679da6a0af51e496db986eaff9 (patch)
tree326cfd15e2949963f3e4dfe79a8c4dd27773ef2b /lib/httpserver/HTTPResponse.h
parentbb8fcb09a0ef2965c2324a6549a60910cfdf42dc (diff)
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.
Diffstat (limited to 'lib/httpserver/HTTPResponse.h')
-rw-r--r--lib/httpserver/HTTPResponse.h5
1 files changed, 4 insertions, 1 deletions
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<Header> mExtraHeaders;
int mContentLength; // only used when reading response from stream
+ IOStream* mpStreamToSendTo; // nonzero only when constructed with a stream
static std::string msDefaultURIPrefix;