diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-14 18:46:26 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-14 18:46:26 +0000 |
commit | d6451b81703c809abcd0f51e74abdba7c732b513 (patch) | |
tree | fab2013702ae33a07e5bb43abad606e0201b485b /sca-cpp/trunk/modules/server/mod-eval.hpp | |
parent | d090bd129574458379aa9997345e7ca5b2c24886 (diff) |
Some refactoring of the HTTP support, tunnel Memcached requests over HTTPS and add HTTPS config to store-cluster sample.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@985561 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-cpp/trunk/modules/server/mod-eval.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sca-cpp/trunk/modules/server/mod-eval.hpp b/sca-cpp/trunk/modules/server/mod-eval.hpp index 0aff56f59d..0d90cb7ceb 100644 --- a/sca-cpp/trunk/modules/server/mod-eval.hpp +++ b/sca-cpp/trunk/modules/server/mod-eval.hpp @@ -37,7 +37,7 @@ #include "../atom/atom.hpp" #include "../json/json.hpp" #include "../scdl/scdl.hpp" -#include "../http/curl.hpp" +#include "../http/http.hpp" #include "../http/httpd.hpp" extern "C" { @@ -113,7 +113,7 @@ const failable<int> get(request_rec* r, const lambda<value(const list<value>&)>& const value func = c_str(json::funcName(string(cadr(ma)))); // Apply the requested function - const failable<value> val = failableResult(impl(cons(func, httpd::queryParams(args)))); + const failable<value> val = failableResult(impl(cons(func, json::queryParams(args)))); if (!hasContent(val)) return mkfailure<int>(reason(val)); @@ -250,6 +250,8 @@ const failable<int> del(request_rec* r, const lambda<value(const list<value>&)>& * Translate a component request. */ int translate(request_rec *r) { + if(r->method_number != M_GET && r->method_number != M_POST && r->method_number != M_PUT && r->method_number != M_DELETE) + return DECLINED; if (strncmp(r->uri, "/components/", 12) != 0) return DECLINED; r->handler = "mod_tuscany_eval"; @@ -544,8 +546,11 @@ const failable<bool> virtualHostCleanup(const ServerConf& sc) { * HTTP request handler. */ int handler(request_rec *r) { + if(r->method_number != M_GET && r->method_number != M_POST && r->method_number != M_PUT && r->method_number != M_DELETE) + return DECLINED; if(strcmp(r->handler, "mod_tuscany_eval")) return DECLINED; + gc_scoped_pool pool(r->pool); ScopedRequest sr(r); httpdDebugRequest(r, "modeval::handler::input"); |