2016-11-25 12:26:51 +08:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP proxy
|
|
|
|
http_proxy
|
|
|
|
noproxy
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
|
|
|
HTTP/1.1 200 OK
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2016-11-25 12:26:51 +08:00
|
|
|
Server: test-server/fake
|
|
|
|
Content-Length: 4
|
|
|
|
Content-Type: text/html
|
|
|
|
|
|
|
|
foo
|
|
|
|
</data>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
Access a non-proxied host with using the combination of http_proxy env var and --noproxy option
|
|
|
|
</name>
|
|
|
|
<setenv>
|
|
|
|
http_proxy=http://dummy:%PROXYPORT/
|
|
|
|
</setenv>
|
|
|
|
<command>
|
2021-03-13 00:38:26 +08:00
|
|
|
http://user:secret@%HOSTIP:%HTTPPORT/%TESTNUMBER --noproxy %HOSTIP --max-time 5
|
2016-11-25 12:26:51 +08:00
|
|
|
</command>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol>
|
2021-03-13 00:38:26 +08:00
|
|
|
GET /%TESTNUMBER HTTP/1.1
|
2016-11-25 12:26:51 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
|
|
|
Authorization: Basic dXNlcjpzZWNyZXQ=
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2016-11-25 12:26:51 +08:00
|
|
|
Accept: */*
|
|
|
|
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|