D3433: httppeer: detect redirect to URL without query string (issue5860)
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Wed May 2 22:44:37 EDT 2018
mharbison72 added a comment.
It looks like the redirect is subtly changing the host. I printed `req.get_full_url()` in keepalive.do_open(), and got:
keepalive: http://$LOCALIP:$HGPORT/redirector?cmd=capabilities
s> GET /redirector?cmd=capabilities HTTP/1.1\r\n
s> Accept-Encoding: identity\r\n
s> user-agent: test\r\n
s> host: $LOCALIP:$HGPORT\r\n (glob)
s> \r\n
s> makefile('rb', None)
s> HTTP/1.1 301 Redirect\r\n
s> Server: testing stub value\r\n
s> Date: $HTTP_DATE$\r\n
s> Location: http://$LOCALIP:$HGPORT/redirected?cmd=capabilities\r\n (glob)
s> Content-Type: text/plain\r\n
s> Content-Length: 10\r\n
s> \r\n
s> redirected
keepalive: http://Envy:$HGPORT/redirected?cmd=capabilities
The subsequent httppeer test is failing with connection refused. This looks like as promising a lead as any. I wonder if this e.read() (and any others) needs to check that the attribute exists first, in case of failures without data available.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3433
To: indygreg, #hg-reviewers
Cc: mharbison72, mercurial-devel
More information about the Mercurial-devel
mailing list