Show More
@@ -257,15 +257,19 b' class httprepository(remoterepository):' | |||
|
257 | 257 | proto = resp.headers['content-type'] |
|
258 | 258 | |
|
259 | 259 | # accept old "text/plain" and "application/hg-changegroup" for now |
|
260 | if not proto.startswith('application/mercurial') and \ | |
|
260 | if not proto.startswith('application/mercurial-') and \ | |
|
261 | 261 | not proto.startswith('text/plain') and \ |
|
262 | 262 | not proto.startswith('application/hg-changegroup'): |
|
263 | 263 | raise hg.RepoError(_("'%s' does not appear to be an hg repository") % |
|
264 | 264 | self._url) |
|
265 | 265 | |
|
266 | if proto.startswith('application/mercurial'): | |
|
267 | version = proto[22:] | |
|
268 | if float(version) > 0.1: | |
|
266 | if proto.startswith('application/mercurial-'): | |
|
267 | try: | |
|
268 | version = float(proto[22:]) | |
|
269 | except ValueError: | |
|
270 | raise hg.RepoError(_("'%s' sent a broken Content-type " | |
|
271 | "header (%s)") % (self._url, proto)) | |
|
272 | if version > 0.1: | |
|
269 | 273 | raise hg.RepoError(_("'%s' uses newer protocol %s") % |
|
270 | 274 | (self._url, version)) |
|
271 | 275 |
General Comments 0
You need to be logged in to leave comments.
Login now