Attempt to handle RSS URIs properly
authorMatt Mackall <mpm@selenic.com>
Mon, 04 Jul 2005 15:42:26 -0800
changeset 620 7369ec5d93f2
parent 619 d96c1153b25d
child 621 004e811f7706
Attempt to handle RSS URIs properly -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Attempt to handle RSS URIs properly manifest hash: 1546939c11a8640ca56f0b0f5c7bdc878b4faa67 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCycliywK+sNU5EO8RAukgAJ9eoJdqTiTQ8xSsSeHMIBmHnnQk9QCfQpFL SAJKUYknvv4IJDUyHjQc61k= =zGdJ -----END PGP SIGNATURE-----
mercurial/hgweb.py
--- a/mercurial/hgweb.py	Mon Jul 04 12:54:42 2005 -0800
+++ b/mercurial/hgweb.py	Mon Jul 04 15:42:26 2005 -0800
@@ -610,8 +610,9 @@
 
         port = os.environ["SERVER_PORT"]
         port = port != "80" and (":" + port) or ""
-        url = "http://%s%s%s" % \
-              (os.environ["SERVER_NAME"], port, os.environ["REQUEST_URI"])
+        uri = os.environ["REQUEST_URI"]
+        if "?" in uri: uri = uri.split("?")[0]
+        url = "http://%s%s%s" % (os.environ["SERVER_NAME"], port, uri)
 
         self.t = templater(m, self.filters,
                            {"url":url,