diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-07 19:09:53 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-10 22:03:18 +0300 |
commit | 21033565488f6c63b4c40962cccfdc8b6ca32b2a (patch) | |
tree | 44732ab7e1c7a7b25e64b82bf61d293f6cff2f86 /mod/mod-build-task.cxx | |
parent | 026377d0c145277b24b3af5fdcf707222e854bd3 (diff) |
Add support for package submission
Diffstat (limited to 'mod/mod-build-task.cxx')
-rw-r--r-- | mod/mod-build-task.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
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<options::build_task> ( 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); |