D4778: wireprotov2: client support for following content redirects

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Fri Oct 5 00:12:57 EDT 2018


mharbison72 added a comment.


  Windows doesn't like this test, and gets a connection refused.  Under the glob is the machine name instead of $LOCALIP that is used above it.  Obviously this isn't the right fix, but this makes the test run on Windows to illustrate it's not something else:
  
    diff --git a/mercurial/wireprotov2peer.py b/mercurial/wireprotov2peer.py
    --- a/mercurial/wireprotov2peer.py
    +++ b/mercurial/wireprotov2peer.py
    @@ -388,6 +388,9 @@ class clienthandler(object):
    
         def _followredirect(self, requestid, redirect):
             """Called to initiate redirect following for a request."""
    +        url = util.url(redirect.url)
    +        url.host = '127.0.0.1'
    +        redirect.url = str(url)
             self._ui.note(_('(following redirect to %s)\n') % redirect.url)
    
             # TODO handle framed responses.
  
  This seems like the problem I mentioned in https://phab.mercurial-scm.org/D3433 on May 2 that you thought boiled down to a `gethostname()`.  Not sure what to do about it.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4778

To: indygreg, #hg-reviewers
Cc: mharbison72, mercurial-devel


More information about the Mercurial-devel mailing list