From 79e7b0c3e48ee75108bf072aa174fb034dfaf86e Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 22 Apr 2017 22:48:18 +0300 Subject: Fix double-slashes in build notification email URLs --- mod/mod-build-result.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'mod') diff --git a/mod/mod-build-result.cxx b/mod/mod-build-result.cxx index 9f6455a..917a6d0 100644 --- a/mod/mod-build-result.cxx +++ b/mod/mod-build-result.cxx @@ -311,7 +311,7 @@ handle (request& rq, response&) sm.out << "No operations results available." << endl; else { - string url (options_->host () + options_->root ().string ()); + string url (options_->host () + options_->root ().representation ()); string pkg (mime_url_encode (b->package_name)); string cfg (mime_url_encode (b->configuration)); @@ -324,12 +324,13 @@ handle (request& rq, response&) const version& ver (b->package_version); for (const auto& r: b->results) - sm.out << r.operation << ": " << r.status << ", " << url << '/' << pkg - << '/' << ver << "/log/" << cfg << '/' << r.operation << endl; + sm.out << r.operation << ": " << r.status << ", " << url << pkg << '/' + << ver << "/log/" << cfg << '/' << r.operation << endl; sm.out << endl - << "force rebuild: " << url << "?build-force&p=" << pkg - << "&v=" << ver << "&c=" << cfg << "&reason=" << endl << endl + << "force rebuild: " << options_->host () << options_->root () + << "?build-force&p=" << pkg << "&v=" << ver << "&c=" << cfg + << "&reason=" << endl << endl << "Note: enter the rebuild reason in the above URL (" << "using '+' instead of space characters)." << endl; } -- cgit v1.1