aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-submit.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'mod/mod-submit.cxx')
-rw-r--r--mod/mod-submit.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/mod/mod-submit.cxx b/mod/mod-submit.cxx
index 5ee358a..6c767cb 100644
--- a/mod/mod-submit.cxx
+++ b/mod/mod-submit.cxx
@@ -93,10 +93,10 @@ init (scanner& s)
if (options_->submit_handler_specified () &&
options_->submit_handler ().relative ())
fail << "submit-handler path must be absolute";
- }
- if (options_->root ().empty ())
- options_->root (dir_path ("/"));
+ if (options_->root ().empty ())
+ options_->root (dir_path ("/"));
+ }
}
bool brep::submit::
@@ -109,8 +109,6 @@ handle (request& rq, response& rs)
HANDLER_DIAG;
- const dir_path& root (options_->root ());
-
// We will respond with the manifest to the submission protocol violations
// and with a plain text message on the internal errors. In the latter case
// we will always respond with the same neutral message for security reason,
@@ -163,6 +161,8 @@ handle (request& rq, response& rs)
if (!options_->submit_data_specified ())
return respond_manifest (404, "submission disabled");
+ const dir_path& root (options_->root ());
+
// Parse the request form data and verify the submission size limit.
//
// Note that if it is exceeded, then there are parameters and this is the