]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/httpd.h
Stuff for adding extra headers to a response (for Authorization: and Location: etc)
[user/henk/code/inspircd.git] / src / modules / httpd.h
index 5ac4d0c85fd4ca1bbf8adcc43135ff69f74dc862..ba059dca8e01ea2a8d2f25c1247a737df6167923 100644 (file)
@@ -50,12 +50,13 @@ class HTTPDocument : public classbase
  protected:
        std::stringstream* document;
        int responsecode;
+       std::string extraheaders;
 
  public:
 
        void* sock;
 
-       HTTPDocument(void* opaque, std::stringstream* doc, int response) : document(doc), responsecode(response), sock(opaque)
+       HTTPDocument(void* opaque, std::stringstream* doc, int response, const std::string &extra) : document(doc), responsecode(response), extraheaders(extra), sock(opaque)
        {
        }
 
@@ -73,6 +74,11 @@ class HTTPDocument : public classbase
        {
                return this->responsecode;
        }
+
+       std::string& GetExtraHeaders()
+       {
+               return this->extraheaders;
+       }
 };
 
 #endif