changeset 3569:a27d90c9336e

Stripping of query string (since 88b4755fa48f) stripped too much (issue327) rstrip(qs) not only strips qs from the right, but it continues stripping every char at the end of the URL that occurs on qs.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sat, 28 Oct 2006 11:00:59 +0200
parents 23f7d9621783
children c141d07198b9
files mercurial/httprepo.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/httprepo.py
+++ b/mercurial/httprepo.py
@@ -240,7 +240,8 @@ class httprepository(remoterepository):
             # this only happens with Python 2.3, later versions raise URLError
             raise util.Abort(_('http error, possibly caused by proxy setting'))
         # record the url we got redirected to
-        self._url = resp.geturl().rstrip(qs)
+        if resp.geturl().endswith(qs):
+            self._url = resp.geturl()[:-len(qs)]
         try:
             proto = resp.getheader('content-type')
         except AttributeError: