--- a/mercurial/httppeer.py Sun Feb 17 14:41:31 2013 -0600
+++ b/mercurial/httppeer.py Sun Feb 17 14:34:53 2013 -0600
@@ -145,7 +145,8 @@
raise error.OutOfBandError(resp.read())
# accept old "text/plain" and "application/hg-changegroup" for now
if not (proto.startswith('application/mercurial-') or
- proto.startswith('text/plain') or
+ (proto.startswith('text/plain')
+ and not resp.headers.get('content-length')) or
proto.startswith('application/hg-changegroup')):
self.ui.debug("requested URL: '%s'\n" % util.hidepassword(cu))
raise error.RepoError(