xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | HTTP CONNECT |
| 7 | HTTP Basic auth |
| 8 | HTTP proxy |
| 9 | HTTP proxy Basic auth |
| 10 | proxytunnel |
| 11 | </keywords> |
| 12 | </info> |
| 13 | |
| 14 | # |
| 15 | # Server-side |
| 16 | <reply> |
| 17 | <connect> |
| 18 | HTTP/1.1 200 OK
|
| 19 | Connected-fine: sure
|
| 20 |
|
| 21 | </connect> |
| 22 | |
| 23 | <data> |
| 24 | HTTP/1.1 200 OK |
| 25 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 26 | Server: test-server/fake |
| 27 | Content-Type: text/html |
| 28 | Content-Length: 9 |
| 29 | |
| 30 | contents |
| 31 | </data> |
| 32 | <datacheck> |
| 33 | HTTP/1.1 200 OK
|
| 34 | Connected-fine: sure
|
| 35 |
|
| 36 | HTTP/1.1 200 OK |
| 37 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 38 | Server: test-server/fake |
| 39 | Content-Type: text/html |
| 40 | Content-Length: 9 |
| 41 | |
| 42 | contents |
| 43 | </datacheck> |
| 44 | </reply> |
| 45 | |
| 46 | # |
| 47 | # Client-side |
| 48 | <client> |
| 49 | <server> |
| 50 | http |
| 51 | http-proxy |
| 52 | </server> |
| 53 | <name> |
| 54 | HTTP CONNECT with proxytunnel getting two URLs from the same host |
| 55 | </name> |
| 56 | <command> |
| 57 | http://remotesite.com.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -p -x %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself http://remotesite.com.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER |
| 58 | </command> |
| 59 | <features> |
| 60 | proxy |
| 61 | </features> |
| 62 | </client> |
| 63 | |
| 64 | # |
| 65 | # Verify data after the test has been "shot" |
| 66 | <verify> |
| 67 | <proxy> |
| 68 | CONNECT remotesite.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
|
| 69 | Host: remotesite.com.%TESTNUMBER:%HTTPPORT
|
| 70 | Proxy-Authorization: Basic eW91YXJlOnlvdXJzZWxm
|
| 71 | User-Agent: curl/%VERSION
|
| 72 | Proxy-Connection: Keep-Alive
|
| 73 |
|
| 74 | </proxy> |
| 75 | <protocol> |
| 76 | GET /we/want/that/page/%TESTNUMBER HTTP/1.1
|
| 77 | Host: remotesite.com.%TESTNUMBER:%HTTPPORT
|
| 78 | Authorization: Basic aWFtOm15c2VsZg==
|
| 79 | User-Agent: curl/%VERSION
|
| 80 | Accept: */*
|
| 81 |
|
| 82 | GET /we/want/that/page/%TESTNUMBER HTTP/1.1
|
| 83 | Host: remotesite.com.%TESTNUMBER:%HTTPPORT
|
| 84 | Authorization: Basic aWFtOm15c2VsZg==
|
| 85 | User-Agent: curl/%VERSION
|
| 86 | Accept: */*
|
| 87 |
|
| 88 | </protocol> |
| 89 | </verify> |
| 90 | </testcase> |