From 21033565488f6c63b4c40962cccfdc8b6ca32b2a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 7 Jul 2018 19:09:53 +0300 Subject: Add support for package submission --- mod/mod-build-task.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'mod/mod-build-task.cxx') diff --git a/mod/mod-build-task.cxx b/mod/mod-build-task.cxx index f1e4cdb..4e56d02 100644 --- a/mod/mod-build-task.cxx +++ b/mod/mod-build-task.cxx @@ -52,7 +52,7 @@ build_task (const build_task& r) void brep::build_task:: init (scanner& s) { - MODULE_DIAG; + HANDLER_DIAG; options_ = make_shared ( s, unknown_mode::fail, unknown_mode::fail); @@ -81,7 +81,7 @@ init (scanner& s) bool brep::build_task:: handle (request& rq, response& rs) { - MODULE_DIAG; + HANDLER_DIAG; if (build_db_ == nullptr) throw invalid_request (501, "not implemented"); @@ -90,7 +90,10 @@ handle (request& rq, response& rs) try { - name_value_scanner s (rq.parameters ()); + // Note that we expect the task 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 = params::build_task (s, unknown_mode::fail, unknown_mode::fail); } catch (const cli::exception& e) @@ -102,6 +105,10 @@ handle (request& rq, response& rs) 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_task_request_max_size ()); manifest_parser p (rq.content (limit, limit), "task_request_manifest"); tqm = task_request_manifest (p); -- cgit v1.1