From d09f17fbd7ffd5ea92feeb8aded6c66b1bfa2333 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 14 Sep 2015 16:10:47 +0200 Subject: Make package details and package version detals URLs conforming to the schema described in thoughts.txt --- brep/package-search.cxx | 2 +- brep/package-version-search.cxx | 4 ++-- etc/httpd.conf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/brep/package-search.cxx b/brep/package-search.cxx index 50dfe4e..f51dade 100644 --- a/brep/package-search.cxx +++ b/brep/package-search.cxx @@ -113,7 +113,7 @@ namespace brep s << DIV(CLASS="package") << DIV(CLASS="name") << A - << HREF << "/go/" << mime_url_encode (p.name) << "/"; + << HREF << "/go/" << mime_url_encode (p.name); // Propagate search criteria to the package version search url. // diff --git a/brep/package-version-search.cxx b/brep/package-version-search.cxx index d95b392..df0ba81 100644 --- a/brep/package-version-search.cxx +++ b/brep/package-version-search.cxx @@ -179,7 +179,7 @@ namespace brep << DIV(CLASS="version") << A << HREF - << "/go/" << mime_url_encode (name) << "/" << vs << "/" + << "/go/" << mime_url_encode (name) << "/" << vs << ~HREF << vs << ~A @@ -213,7 +213,7 @@ namespace brep auto u ( [&name, &pr](size_t p) { - string url ("/go/" + name + "/"); + string url (name); if (p > 0) url += "?p=" + to_string (p); diff --git a/etc/httpd.conf b/etc/httpd.conf index 8d3dec5..ef8cb50 100644 --- a/etc/httpd.conf +++ b/etc/httpd.conf @@ -60,7 +60,7 @@ LoadModule package_version_search_srv ${AP_MODULE_DIR}/libbrep-apache.so SetHandler package-search - + SetHandler package-version-search -- cgit v1.1