aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-build-result.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-07-07 19:09:53 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-07-10 22:03:18 +0300
commit21033565488f6c63b4c40962cccfdc8b6ca32b2a (patch)
tree44732ab7e1c7a7b25e64b82bf61d293f6cff2f86 /mod/mod-build-result.cxx
parent026377d0c145277b24b3af5fdcf707222e854bd3 (diff)
Add support for package submission
Diffstat (limited to 'mod/mod-build-result.cxx')
-rw-r--r--mod/mod-build-result.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/mod/mod-build-result.cxx b/mod/mod-build-result.cxx
index 7891fe1..65e8425 100644
--- a/mod/mod-build-result.cxx
+++ b/mod/mod-build-result.cxx
@@ -46,7 +46,7 @@ build_result (const build_result& r)
void brep::build_result::
init (scanner& s)
{
- MODULE_DIAG;
+ HANDLER_DIAG;
options_ = make_shared<options::build_result> (
s, unknown_mode::fail, unknown_mode::fail);
@@ -68,7 +68,7 @@ handle (request& rq, response&)
{
using brep::version; // Not to confuse with module::version.
- MODULE_DIAG;
+ HANDLER_DIAG;
if (build_db_ == nullptr)
throw invalid_request (501, "not implemented");
@@ -77,7 +77,10 @@ handle (request& rq, response&)
//
try
{
- name_value_scanner s (rq.parameters ());
+ // Note that we expect the result request manifest to be posted and so
+ // consider parameters from the URL only.
+ //
+ name_value_scanner s (rq.parameters (0 /* limit */, true /* url_only */));
params::build_result (s, unknown_mode::fail, unknown_mode::fail);
}
catch (const cli::exception& e)
@@ -89,6 +92,10 @@ handle (request& rq, response&)
try
{
+ // We fully cache the request content to be able to retry the request
+ // handling if odb::recoverable is thrown (see database-module.cxx for
+ // details).
+ //
size_t limit (options_->build_result_request_max_size ());
manifest_parser p (rq.content (limit, limit), "result_request_manifest");
rqm = result_request_manifest (p);