You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2011/03/27 23:59:13 UTC
svn commit: r1086049 - in /tuscany/sca-cpp/trunk/modules: http/httpd.hpp
server/mod-eval.hpp
Author: jsdelfino
Date: Sun Mar 27 21:59:13 2011
New Revision: 1086049
URL: http://svn.apache.org/viewvc?rev=1086049&view=rev
Log:
Support returning binary content. Fix server bug preventing a component to return an empty list.
Modified:
tuscany/sca-cpp/trunk/modules/http/httpd.hpp
tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp
Modified: tuscany/sca-cpp/trunk/modules/http/httpd.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/httpd.hpp?rev=1086049&r1=1086048&r2=1086049&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/httpd.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/http/httpd.hpp Sun Mar 27 21:59:13 2011
@@ -344,7 +344,7 @@ const failable<int> writeResult(const fa
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;
}
Modified: tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp?rev=1086049&r1=1086048&r2=1086049&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp Sun Mar 27 21:59:13 2011
@@ -140,7 +140,7 @@ const failable<int> get(request_rec* r,
}
// 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);
}