aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-14 16:10:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-24 11:23:33 +0200
commitd09f17fbd7ffd5ea92feeb8aded6c66b1bfa2333 (patch)
tree8a8914d6f9de7919689f1f2e073c78f7e3d45ad7
parentacc0d3573951c0efd1bd6108474e1e27fc728576 (diff)
Make package details and package version detals URLs conforming to the schema described in thoughts.txt
-rw-r--r--brep/package-search.cxx2
-rw-r--r--brep/package-version-search.cxx4
-rw-r--r--etc/httpd.conf2
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
</LocationMatch>
-<LocationMatch ^/go/[^/]+/?$>
+<LocationMatch ^/go/[^/]+$>
SetHandler package-version-search
</LocationMatch>