diff options
Diffstat (limited to 'sca-cpp/trunk/modules/http/httpd.hpp')
-rw-r--r-- | sca-cpp/trunk/modules/http/httpd.hpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sca-cpp/trunk/modules/http/httpd.hpp b/sca-cpp/trunk/modules/http/httpd.hpp index 86a89d8823..534fd78503 100644 --- a/sca-cpp/trunk/modules/http/httpd.hpp +++ b/sca-cpp/trunk/modules/http/httpd.hpp @@ -145,13 +145,6 @@ const string hostName(request_rec* r, const string& def = "localhost") { } /** - * Return the first subdomain name in a host name. - */ -const string subdomain(const string& host) { - return substr(host, 0, find(host, '.')); -} - -/** * Return true if a request is targeting a virtual host. */ const bool isVirtualHostRequest(const server_rec* s, request_rec* r) { @@ -190,6 +183,16 @@ const string contentType(const request_rec* r) { } /** + * Return the cookie header of a request. + */ +const string cookie(const request_rec* r) { + const char* c = apr_table_get(r->headers_in, "Cookie"); + if (c == NULL) + return ""; + return c; +} + +/** * Return the remaining part of a uri after the given path (aka the path info.) */ const list<value> pathInfo(const list<value>& uri, const list<value>& path) { |