From d6451b81703c809abcd0f51e74abdba7c732b513 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sat, 14 Aug 2010 18:46:26 +0000 Subject: 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 --- sca-cpp/trunk/modules/server/mod-eval.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sca-cpp/trunk/modules/server/mod-eval.hpp') 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 get(request_rec* r, const lambda&)>& const value func = c_str(json::funcName(string(cadr(ma)))); // Apply the requested function - const failable val = failableResult(impl(cons(func, httpd::queryParams(args)))); + const failable val = failableResult(impl(cons(func, json::queryParams(args)))); if (!hasContent(val)) return mkfailure(reason(val)); @@ -250,6 +250,8 @@ const failable del(request_rec* r, const lambda&)>& * 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 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"); -- cgit v1.2.3