diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-27 21:59:13 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-27 21:59:13 +0000 |
commit | fc1662732a73bc1c1d9339124693c7b06790aeeb (patch) | |
tree | a501e2e401d5fa18bbaffe1c0bf2d26525ce9b25 /sca-cpp/trunk | |
parent | b8bb1902cdabb27b93a84128c58407eceddfdb3c (diff) |
Support returning binary content. Fix server bug preventing a component to return an empty list.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1086049 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk')
-rw-r--r-- | sca-cpp/trunk/modules/http/httpd.hpp | 2 | ||||
-rw-r--r-- | sca-cpp/trunk/modules/server/mod-eval.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sca-cpp/trunk/modules/http/httpd.hpp b/sca-cpp/trunk/modules/http/httpd.hpp index 768537aa03..d9570ce5bd 100644 --- a/sca-cpp/trunk/modules/http/httpd.hpp +++ b/sca-cpp/trunk/modules/http/httpd.hpp @@ -344,7 +344,7 @@ const failable<int> writeResult(const failable<list<string> >& ls, const string& return OK; } ap_set_content_type(r, apr_pstrdup(r->pool, c_str(ct))); - ap_rputs(c_str(ob), r); + ap_rwrite(c_str(ob), (int)length(ob), r); return OK; } diff --git a/sca-cpp/trunk/modules/server/mod-eval.hpp b/sca-cpp/trunk/modules/server/mod-eval.hpp index efca2058e5..27657dd587 100644 --- a/sca-cpp/trunk/modules/server/mod-eval.hpp +++ b/sca-cpp/trunk/modules/server/mod-eval.hpp @@ -140,7 +140,7 @@ const failable<int> get(request_rec* r, const lambda<value(const list<value>&)>& } // Write an empty list as a JSON empty value - if (isNil(c)) { + if (isNil((list<value>)c)) { js::JSContext cx; return httpd::writeResult(json::writeJSON(list<value>(), cx), "application/json", r); } |