summaryrefslogtreecommitdiff
path: root/tests/data/test1106
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/test1106
parent2c9644b812cbe26d9da146d69158c6ba0bb39836 (diff)
downloadcurl-3111701c38ee4d15df8e2d76dfcf945dbf2c0bfe.tar.gz
- 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/test1106')
-rw-r--r--tests/data/test110656
1 files changed, 56 insertions, 0 deletions
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>