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
This commit is contained in:
parent
b8bb1902cd
commit
fc1662732a
2 changed files with 2 additions and 2 deletions
|
@ -344,7 +344,7 @@ const failable<int> writeResult(const failable<list<string> >& ls, const string&
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
ap_set_content_type(r, apr_pstrdup(r->pool, c_str(ct)));
|
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;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
// Write an empty list as a JSON empty value
|
||||||
if (isNil(c)) {
|
if (isNil((list<value>)c)) {
|
||||||
js::JSContext cx;
|
js::JSContext cx;
|
||||||
return httpd::writeResult(json::writeJSON(list<value>(), cx), "application/json", r);
|
return httpd::writeResult(json::writeJSON(list<value>(), cx), "application/json", r);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue