xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP proxy |
| 6 | --location |
| 7 | </keywords> |
| 8 | </info> |
| 9 | |
| 10 | # |
| 11 | # Server-side |
| 12 | <reply> |
| 13 | <data> |
| 14 | HTTP/1.1 301 redirect |
| 15 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 16 | Server: test-server/fake |
| 17 | Content-Length: 0 |
| 18 | Connection: close |
| 19 | Content-Type: text/html |
| 20 | Location: http://firsthost.com:9999/a/path/%TESTNUMBER0002 |
| 21 | |
| 22 | </data> |
| 23 | <data2> |
| 24 | HTTP/1.1 200 OK |
| 25 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 26 | Server: test-server/fake |
| 27 | Content-Length: 4 |
| 28 | Connection: close |
| 29 | Content-Type: text/html |
| 30 | |
| 31 | hey |
| 32 | </data2> |
| 33 | |
| 34 | <datacheck> |
| 35 | HTTP/1.1 301 redirect |
| 36 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 37 | Server: test-server/fake |
| 38 | Content-Length: 0 |
| 39 | Connection: close |
| 40 | Content-Type: text/html |
| 41 | Location: http://firsthost.com:9999/a/path/%TESTNUMBER0002 |
| 42 | |
| 43 | HTTP/1.1 200 OK |
| 44 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 45 | Server: test-server/fake |
| 46 | Content-Length: 4 |
| 47 | Connection: close |
| 48 | Content-Type: text/html |
| 49 | |
| 50 | hey |
| 51 | </datacheck> |
| 52 | |
| 53 | </reply> |
| 54 | |
| 55 | # |
| 56 | # Client-side |
| 57 | <client> |
| 58 | <features> |
| 59 | proxy |
| 60 | </features> |
| 61 | <server> |
| 62 | http |
| 63 | </server> |
| 64 | <name> |
| 65 | HTTP with auth redirected to HTTP on a diff port w/o auth |
| 66 | </name> |
| 67 | <command> |
| 68 | -x http://%HOSTIP:%HTTPPORT http://firsthost.com -L -u joe:secret |
| 69 | </command> |
| 70 | </client> |
| 71 | |
| 72 | # |
| 73 | # Verify data after the test has been "shot" |
| 74 | <verify> |
| 75 | <protocol> |
| 76 | GET http://firsthost.com/ HTTP/1.1
|
| 77 | Host: firsthost.com
|
| 78 | Authorization: Basic am9lOnNlY3JldA==
|
| 79 | User-Agent: curl/%VERSION
|
| 80 | Accept: */*
|
| 81 | Proxy-Connection: Keep-Alive
|
| 82 |
|
| 83 | GET http://firsthost.com:9999/a/path/%TESTNUMBER0002 HTTP/1.1
|
| 84 | Host: firsthost.com:9999
|
| 85 | User-Agent: curl/%VERSION
|
| 86 | Accept: */*
|
| 87 | Proxy-Connection: Keep-Alive
|
| 88 |
|
| 89 | </protocol> |
| 90 | </verify> |
| 91 | </testcase> |