summaryrefslogtreecommitdiff
path: root/icespider/fcgi/cgiRequestBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'icespider/fcgi/cgiRequestBase.cpp')
-rw-r--r--icespider/fcgi/cgiRequestBase.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/icespider/fcgi/cgiRequestBase.cpp b/icespider/fcgi/cgiRequestBase.cpp
index e820e05..f99bbf1 100644
--- a/icespider/fcgi/cgiRequestBase.cpp
+++ b/icespider/fcgi/cgiRequestBase.cpp
@@ -85,6 +85,12 @@ namespace IceSpider {
return pathElements;
}
+ PathElements &
+ CgiRequestBase::getRequestPath()
+ {
+ return pathElements;
+ }
+
HttpMethod
CgiRequestBase::getRequestMethod() const
{
@@ -121,6 +127,36 @@ namespace IceSpider {
return optionalLookup(("HTTP_" + boost::algorithm::to_upper_copy(key)).c_str(), envmap);
}
+ void
+ CgiRequestBase::setQueryStringParam(const std::string & key, const OptionalString & val)
+ {
+ if (val)
+ qsmap[key] = val;
+ else
+ qsmap.erase(key);
+ }
+
+ void
+ CgiRequestBase::setHeaderParam(const std::string &, const OptionalString &)
+ {
+ throw std::runtime_error("Changing the CGI environment is not supported.");
+ }
+
+ void
+ CgiRequestBase::setCookieParam(const std::string & key, const OptionalString & val)
+ {
+ if (val)
+ cookiemap[key] = val;
+ else
+ cookiemap.erase(key);
+ }
+
+ void
+ CgiRequestBase::setEnv(const std::string &, const OptionalString &)
+ {
+ throw std::runtime_error("Changing the CGI environment is not supported.");
+ }
+
void CgiRequestBase::response(short statusCode, const std::string & statusMsg) const
{
getOutputStream()