diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-11-14 22:19:50 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-11-15 20:40:40 +0300 |
commit | 2667fad8bf6e7ef6ef1894ab49a3bdc5cc858607 (patch) | |
tree | f3f6650da4c3a4b3b8a5c06343c82646be84507f /mod/mod-ci.cxx | |
parent | d622f34a8c6ad0e71618f75a02787589b21d795c (diff) |
Add support for repository location compound schemes (git+https, etc)
Diffstat (limited to 'mod/mod-ci.cxx')
-rw-r--r-- | mod/mod-ci.cxx | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/mod/mod-ci.cxx b/mod/mod-ci.cxx index e16a1a1..e0b35dd 100644 --- a/mod/mod-ci.cxx +++ b/mod/mod-ci.cxx @@ -222,23 +222,12 @@ handle (request& rq, response& rs) return true; } - // Parse and verify the remote repository location. + // Verify the remote repository location. // - repository_location rl; + const repository_location rl (params.repository ()); - try - { - const repository_url& u (params.repository ()); - - if (u.empty () || u.scheme == repository_protocol::file) - throw invalid_argument (""); - - rl = repository_location (u, guess_type (u, false /* local */)); - } - catch (const invalid_argument&) - { + if (rl.empty () || rl.local ()) return respond_manifest (400, "invalid repository location"); - } // Verify the package name[/version] arguments. // |