From 1a01ce4fe5882fcc5b312172d7fdf409e0cb9765 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 20 Feb 2012 07:20:38 +0000 Subject: Fixes to the hosting module to correctly store ATOM feeds instead of raw collections and work with the sqldb component. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1291136 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/modules/http/http.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sca-cpp/trunk/modules/http/http.hpp') diff --git a/sca-cpp/trunk/modules/http/http.hpp b/sca-cpp/trunk/modules/http/http.hpp index 530f3c0c5c..0b4c9f6822 100644 --- a/sca-cpp/trunk/modules/http/http.hpp +++ b/sca-cpp/trunk/modules/http/http.hpp @@ -634,7 +634,7 @@ const failable > > contentRequest(const value& c, unused const if (isString(car(c)) && !isNil(cdr(c)) && isList(cadr(c))) return writeRequest(convertValues(cadr(c)), car(c)); - // Write an assoc value as a JSON result + // Write an assoc value as JSON if (isSymbol(car(c)) && !isNil(cdr(c))) { js::JSContext cx; const list lc = mklist(c); @@ -888,7 +888,7 @@ const string queryString(const list > args) { * Filter path segment in a list of arguments. */ const bool filterPath(const value& arg) { - return isString(arg); + return isString(arg) || isSymbol(arg); } /** @@ -914,11 +914,13 @@ struct proxy { } const value operator()(const list& args) const { + debug(args, "http::proxy::args"); const value fun = car(args); if (fun == "get") { const list lp = filter(filterPath, cadr(args)); - debug(lp, "http::queryString::arg"); + debug(lp, "http::proxy::path"); const list lq = map(escapeQuery, filter(filterQuery, cadr(args))); + debug(lp, "http::proxy::query"); const value p = path(lp); const value q = queryString(lq); const failable val = get(uri + p + (q != ""? string("?") + q : string("")), cs); -- cgit v1.2.3