diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-02-20 07:20:38 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-02-20 07:20:38 +0000 |
commit | 1a01ce4fe5882fcc5b312172d7fdf409e0cb9765 (patch) | |
tree | a01683ba47a8cc7137700b3c33b5a7a14c153e2c /sca-cpp/trunk/modules/http/http.hpp | |
parent | 3479cfa1585b752df58873b941b5bfd06a879b04 (diff) |
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
Diffstat (limited to '')
-rw-r--r-- | sca-cpp/trunk/modules/http/http.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
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<list<list<string> > > contentRequest(const value& c, unused const if (isString(car<value>(c)) && !isNil(cdr<value>(c)) && isList(cadr<value>(c))) return writeRequest(convertValues<string>(cadr<value>(c)), car<value>(c)); - // Write an assoc value as a JSON result + // Write an assoc value as JSON if (isSymbol(car<value>(c)) && !isNil(cdr<value>(c))) { js::JSContext cx; const list<value> lc = mklist<value>(c); @@ -888,7 +888,7 @@ const string queryString(const list<list<value> > 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<value>& args) const { + debug(args, "http::proxy::args"); const value fun = car(args); if (fun == "get") { const list<value> lp = filter<value>(filterPath, cadr(args)); - debug(lp, "http::queryString::arg"); + debug(lp, "http::proxy::path"); const list<value> lq = map<value, value>(escapeQuery, filter<value>(filterQuery, cadr(args))); + debug(lp, "http::proxy::query"); const value p = path(lp); const value q = queryString(lq); const failable<value> val = get(uri + p + (q != ""? string("?") + q : string("")), cs); |