mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:33:31 +03:00
url: --noproxy option overrides NO_PROXY environment variable
Under condition using http_proxy env var, noproxy list was the combination of --noproxy option and NO_PROXY env var previously. Since this commit, --noproxy option overrides NO_PROXY environment variable even if use http_proxy env var. Closes #1140
This commit is contained in:
parent
efdbfde7ca
commit
2ac1942c72
10 changed files with 335 additions and 2 deletions
54
tests/data/test1256
Normal file
54
tests/data/test1256
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
HTTP proxy
|
||||
NO_PROXY
|
||||
noproxy
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake
|
||||
Content-Length: 4
|
||||
Content-Type: text/html
|
||||
|
||||
foo
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<name>
|
||||
Under condition using http_proxy, override NO_PROXY by --nproxy and access target URL through proxy
|
||||
</name>
|
||||
<setenv>
|
||||
http_proxy=http://%HOSTIP:%HTTPPORT
|
||||
NO_PROXY=example.com
|
||||
</setenv>
|
||||
<command>
|
||||
http://somewhere.example.com/1256 --noproxy %HOSTIP
|
||||
</command>
|
||||
</client>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<strip>
|
||||
^User-Agent:.*
|
||||
</strip>
|
||||
<protocol>
|
||||
GET http://somewhere.example.com/1256 HTTP/1.1
|
||||
Host: somewhere.example.com
|
||||
Accept: */*
|
||||
Proxy-Connection: Keep-Alive
|
||||
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue