Mercurial > hg > mercurial-crew-with-dirclash
comparison tests/test-http-proxy @ 2337:3f24bc5dee81
http: fix many problems with url parsing and auth. added proxy test.
problems fixed:
- https scheme handled properly for real and proxy urls.
- url of form "http://user:password@host:port/path" now ok.
- no-proxy check uses proper host names.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Mon, 22 May 2006 15:42:49 -0700 |
parents | |
children | a20877c8a3e2 |
comparison
equal
deleted
inserted
replaced
2336:f77edcffb837 | 2337:3f24bc5dee81 |
---|---|
1 #!/bin/sh | |
2 | |
3 hg init a | |
4 cd a | |
5 echo a > a | |
6 hg ci -Ama -d '1123456789 0' | |
7 hg serve -p 20059 -d --pid-file=hg.pid | |
8 | |
9 cd .. | |
10 ("$TESTDIR/tinyproxy.py" 20060 localhost >/dev/null 2>&1 </dev/null & | |
11 echo $! > proxy.pid) | |
12 sleep 2 | |
13 | |
14 echo %% url for proxy | |
15 http_proxy=http://localhost:20060/ hg --config http_proxy.always=True clone http://localhost:20059/ b | |
16 | |
17 echo %% host:port for proxy | |
18 http_proxy=localhost:20060 hg clone --config http_proxy.always=True http://localhost:20059/ c | |
19 | |
20 echo %% proxy url with user name and password | |
21 http_proxy=http://user:passwd@localhost:20060 hg clone --config http_proxy.always=True http://localhost:20059/ d | |
22 | |
23 echo %% url with user name and password | |
24 http_proxy=http://user:passwd@localhost:20060 hg clone --config http_proxy.always=True http://user:passwd@localhost:20059/ e | |
25 | |
26 echo %% bad host:port for proxy | |
27 http_proxy=localhost:20061 hg clone --config http_proxy.always=True http://localhost:20059/ f | |
28 | |
29 kill $(cat proxy.pid a/hg.pid) | |
30 exit 0 |