diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-23 06:50:15 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-23 06:50:15 +0000 |
commit | 2faafb710633884260b070e1d4ed4ef46326612a (patch) | |
tree | deea4d9ecb9e799fcd28900a1b76c6c0bce01cbf /sca-cpp/trunk/modules/http/httpd.hpp | |
parent | 8f252e970a8b3584d3f566dba619b79d70b5efcf (diff) |
Support cookies over outgoing HTTP calls and a shorter component URL addressing scheme.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1126336 13f79535-47bb-0310-9956-ffa450edef68
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) { |