D3433: httppeer: detect redirect to URL without query string (issue5860)

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Wed May 2 23:10:24 EDT 2018


mharbison72 added a comment.


  With these fixes, it works on Windows. I'm not sure if the advertisedbaseurl a couple lines above needs to be adjusted too.
  
  I've got no idea why there seems to be a subtle difference between baseurl and advertisedbaseurl on Windows.  Nor why what I think is the raw redirect header in the output seemingly correct with advertisedbaseurl.  I did use baseurl in the LFS server though, because I think I saw this subtle difference.

INLINE COMMENTS

> test-http-protocol.t:361
> +  >     res.status = b'301 Redirect'
> +  >     newurl = b'%s/redirected%s' % (req.advertisedbaseurl, relpath)
> +  >     if not repo.ui.configbool('testing', 'redirectqs', True) and b'?' in newurl:

If this is changed to req.baseurl, it works.

> test-http-protocol.t:375
> +  >     serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d
> +  $ cat hg.pid > $DAEMON_PIDS
> +

>> $DAEMON_PIDS

> test-http-protocol.t:475
> +  >     serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d
> +  $ cat hg.pid > $DAEMON_PIDS
> +

>> $DAEMON_PIDS

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