Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/httprepo.py @ 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 | 3bab1fc0ab75 |
children | c141d07198b9 |
comparison
equal
deleted
inserted
replaced
3568:23f7d9621783 | 3569:a27d90c9336e |
---|---|
238 raise IOError(None, inst) | 238 raise IOError(None, inst) |
239 except IndexError: | 239 except IndexError: |
240 # this only happens with Python 2.3, later versions raise URLError | 240 # this only happens with Python 2.3, later versions raise URLError |
241 raise util.Abort(_('http error, possibly caused by proxy setting')) | 241 raise util.Abort(_('http error, possibly caused by proxy setting')) |
242 # record the url we got redirected to | 242 # record the url we got redirected to |
243 self._url = resp.geturl().rstrip(qs) | 243 if resp.geturl().endswith(qs): |
244 self._url = resp.geturl()[:-len(qs)] | |
244 try: | 245 try: |
245 proto = resp.getheader('content-type') | 246 proto = resp.getheader('content-type') |
246 except AttributeError: | 247 except AttributeError: |
247 proto = resp.headers['content-type'] | 248 proto = resp.headers['content-type'] |
248 | 249 |