- 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)
This commit is contained in:
56
tests/data/test1106
Normal file
56
tests/data/test1106
Normal file
@@ -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>
|
||||
Reference in New Issue
Block a user