]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/httpd.h
Move Blocking/NonBlocking to socket.cpp and make inline
[user/henk/code/inspircd.git] / src / modules / httpd.h
index 3f8ee215cdff88a723923ad7bc8601220edfb6b1..ba059dca8e01ea2a8d2f25c1247a737df6167923 100644 (file)
@@ -50,9 +50,13 @@ class HTTPDocument : public classbase
  protected:
        std::stringstream* document;
        int responsecode;
+       std::string extraheaders;
 
  public:
-       HTTPDocument(std::stringstream* doc, int response) : document(doc), responsecode(response)
+
+       void* sock;
+
+       HTTPDocument(void* opaque, std::stringstream* doc, int response, const std::string &extra) : document(doc), responsecode(response), extraheaders(extra), sock(opaque)
        {
        }
 
@@ -61,15 +65,20 @@ class HTTPDocument : public classbase
                return this->document;
        }
 
-       std::stringstream* GetDocumentSize()
+       unsigned long GetDocumentSize()
        {
-               return this->document.size();
+               return this->document->str().length();
        }
 
        int GetResponseCode()
        {
                return this->responsecode;
        }
+
+       std::string& GetExtraHeaders()
+       {
+               return this->extraheaders;
+       }
 };
 
 #endif