xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP proxy |
| 6 | http_proxy |
| 7 | NO_PROXY |
| 8 | </keywords> |
| 9 | </info> |
| 10 | |
| 11 | # Server-side |
| 12 | <reply> |
| 13 | <data> |
| 14 | HTTP/1.1 200 OK |
| 15 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 16 | Server: test-server/fake |
| 17 | Content-Length: 4 |
| 18 | Content-Type: text/html |
| 19 | |
| 20 | foo |
| 21 | </data> |
| 22 | </reply> |
| 23 | |
| 24 | # Client-side |
| 25 | <client> |
| 26 | <server> |
| 27 | http |
| 28 | </server> |
| 29 | <name> |
| 30 | Access a non-proxied host with using the combination of http_proxy env var and NO_PROXY env var |
| 31 | </name> |
| 32 | <setenv> |
| 33 | http_proxy=http://dummy:%PROXYPORT/ |
| 34 | NO_PROXY=%HOSTIP |
| 35 | </setenv> |
| 36 | <command> |
| 37 | http://user:secret@%HOSTIP:%HTTPPORT/%TESTNUMBER --max-time 5 |
| 38 | </command> |
| 39 | </client> |
| 40 | |
| 41 | # Verify data after the test has been "shot" |
| 42 | <verify> |
| 43 | <protocol> |
| 44 | GET /%TESTNUMBER HTTP/1.1
|
| 45 | Host: %HOSTIP:%HTTPPORT
|
| 46 | Authorization: Basic dXNlcjpzZWNyZXQ=
|
| 47 | User-Agent: curl/%VERSION
|
| 48 | Accept: */*
|
| 49 |
|
| 50 | </protocol> |
| 51 | </verify> |
| 52 | </testcase> |