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

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Thu May 3 15:51:34 EDT 2018


mharbison72 added a comment.


  I'll probably be at work for another ~2 hours if you need me to test with SCM Manager, but I can stay later if needed.

INLINE COMMENTS

> indygreg wrote in test-http-protocol.t:361
> The distinction between these URLs is that one uses the host:port as it actually is and the other uses the host:port as identified by the client. Since we are sending a URL back to the client, we should be using the advertised host:port.
> 
> The fact that the advertised host:port is being mangled seemingly points to a bug with the formulation of the `advertised*` variables. This is likely the result of code somewhere using `gethostname()` to populate a hostname field. I'm not sure if this is happening on the client or server. And I'm not sure why it would only be happening on Windows.
> 
> It is something to keep our eye on. But I think it is an issue in the test harness and not the hgweb code. We have unit test coverage for URL formulation in `test-wsgirequest.py` and I'm pretty confident it adheres to PEP 3333.

That makes sense.  And test-wsgirequest.py does run on Windows.

What baffles me is that the header that's printed (e.g. line 393) is correct on Windows with either URL.  So I have no idea where it could have divergent behavior.

Should I change the LFS behavior now, or punt because it's experimental?

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