aboutsummaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-12-14 23:16:09 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-12-14 23:16:09 +0000
commit3111701c38ee4d15df8e2d76dfcf945dbf2c0bfe (patch)
tree1df433d09a86cc4d5906b22a842f868b2ac6a875 /tests/data
parent2c9644b812cbe26d9da146d69158c6ba0bb39836 (diff)
- Jon Nelson found a regression that turned out to be a flaw in how libcurl
detects and uses proxies based on the environment variables. If the proxy was given as an explicit option it worked, but due to the setup order mistake proxies would not be used fine for a few protocols when picked up from '[protocol]_proxy'. Obviously this broke after 7.19.4. I now also added test case 1106 that verifies this functionality. (http://curl.haxx.se/bug/view.cgi?id=2913886)
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/Makefile.am2
-rw-r--r--tests/data/test110656
2 files changed, 57 insertions, 1 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 7aa5f6dca..ac061a15f 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -63,7 +63,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
test1089 test1090 test1091 test1092 test1093 test1094 test1095 test1096 \
test1097 test560 test561 test1098 test1099 test562 test563 test1100 \
test564 test1101 test1102 test1103 test1104 test299 test310 test311 \
- test312 test1105 test565 test800
+ test312 test1105 test565 test800 test1106
filecheck:
@mkdir test-place; \
diff --git a/tests/data/test1106 b/tests/data/test1106
new file mode 100644
index 000000000..2ac14d145
--- /dev/null
+++ b/tests/data/test1106
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+FTP
+CURLOPT_PORT
+HTTP proxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK swsclose
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Accept-Ranges: bytes
+Content-Length: 6
+
+hello
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+FTP URL and with ftp_proxy environment variable set
+ </name>
+
+<setenv>
+ftp_proxy=http://%HOSTIP:%HTTPPORT/
+</setenv>
+# note that we need quotes around the URL below to make sure the shell doesn't
+# treat the semicolon as a separator!
+ <command>
+"ftp://%HOSTIP:23456/1106"
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET ftp://%HOSTIP:23456/1106 HTTP/1.1
+Host: %HOSTIP:23456
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>