aboutsummaryrefslogtreecommitdiff
path: root/tests/data/test1252
diff options
context:
space:
mode:
authorERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>2016-12-19 16:27:24 +0900
committerDaniel Stenberg <daniel@haxx.se>2017-01-13 11:18:29 +0100
commit2ac1942c72fda6d2a1912fb4e8b6ebfc43ee9f30 (patch)
tree7b0bc441f7d466da9e142517a866f1f104b5f27f /tests/data/test1252
parentefdbfde7ca205f256c4e8b473c775cf73557cfd7 (diff)
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
Diffstat (limited to 'tests/data/test1252')
-rw-r--r--tests/data/test125252
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/data/test1252 b/tests/data/test1252
new file mode 100644
index 000000000..cbaef48b7
--- /dev/null
+++ b/tests/data/test1252
@@ -0,0 +1,52 @@
+<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 --proxy, override NO_PROXY by --nproxy and access target URL directly
+</name>
+<setenv>
+NO_PROXY=example.com
+</setenv>
+<command>
+http://%HOSTIP:%HTTPPORT/1252 --proxy http://%HOSTIP:%HTTPPORT --noproxy %HOSTIP
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1252 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>