Mercurial > hg-stable
changeset 30851:7bfe02b57695 stable
tests: also allow "Protocol not supported" in test-http-proxy error
I've seen this in a (misconfigured) FreeBSD jail which has ::1 as an
entry for localhost, but IPv6 support is disabled in the jail. It took
me months to figure out what was going on (and I only figured it out
when tinyproxy.py got confused by similar IPv4-level misconfiguration
of the localhost domain in /etc/hosts.)
I don't feel strongly about this patch: on the one hand, it's papering
over a host-level misconfiguration, but on the other it avoids some
weird and hard to diagnose problems that can occur in weirdly
restricted environments.
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 20 Jan 2017 10:17:34 -0500 |
parents | 41e31a6f5296 |
children | cdeb0804d98c |
files | tests/test-http-proxy.t |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-http-proxy.t Fri Jan 20 21:33:18 2017 +0900 +++ b/tests/test-http-proxy.t Fri Jan 20 10:17:34 2017 -0500 @@ -83,10 +83,11 @@ updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved -bad host:port for proxy +bad host:port for proxy ("Protocol not supported" can happen on +misconfigured hosts) $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f - abort: error: Connection refused + abort: error: (Connection refused|Protocol not supported) (re) [255] do not use the proxy if it is in the no list