summaryrefslogtreecommitdiff
path: root/src/modules/httpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/httpd.h')
-rw-r--r--src/modules/httpd.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/httpd.h b/src/modules/httpd.h
index 565648659..7738e3fe4 100644
--- a/src/modules/httpd.h
+++ b/src/modules/httpd.h
@@ -17,6 +17,7 @@ class HTTPRequest : public classbase
std::string type;
std::string document;
std::string ipaddr;
+ std::string postdata;
std::stringstream* headers;
public:
@@ -34,8 +35,8 @@ class HTTPRequest : public classbase
* @param opaque An opaque pointer used internally by m_httpd, which you must pass back to the module in your reply.
* @param ip The IP address making the web request.
*/
- HTTPRequest(const std::string &request_type, const std::string &uri, std::stringstream* hdr, void* opaque, const std::string &ip)
- : type(request_type), document(uri), ipaddr(ip), headers(hdr), sock(opaque)
+ HTTPRequest(const std::string &request_type, const std::string &uri, std::stringstream* hdr, void* opaque, const std::string &ip, const std::string &pdata)
+ : type(request_type), document(uri), ipaddr(ip), postdata(pdata), headers(hdr), sock(opaque)
{
}
@@ -48,6 +49,11 @@ class HTTPRequest : public classbase
return headers;
}
+ std::string& GetPostData()
+ {
+ return postdata;
+ }
+
/** Get the request type.
* Any request type can be intercepted, even ones which are invalid in the HTTP/1.1 spec.
* @return The request type, e.g. GET, POST, HEAD