lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | HTTP proxy |
| 7 | followlocation |
| 8 | </keywords> |
| 9 | </info> |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | <data> |
| 13 | HTTP/1.1 302 This is a weirdo text message |
| 14 | Connection: close |
| 15 | Location: http:////foo.example.com/want/11420001 |
| 16 | |
| 17 | This server reply is for testing |
| 18 | </data> |
| 19 | <data1> |
| 20 | HTTP/1.1 200 hello |
| 21 | Connection: close |
| 22 | Content-Length: 4 |
| 23 | |
| 24 | hej |
| 25 | </data1> |
| 26 | <datacheck> |
| 27 | HTTP/1.1 302 This is a weirdo text message |
| 28 | Connection: close |
| 29 | Location: http:////foo.example.com/want/11420001 |
| 30 | |
| 31 | </datacheck> |
| 32 | </reply> |
| 33 | |
| 34 | # Client-side |
| 35 | <client> |
| 36 | <server> |
| 37 | http |
| 38 | </server> |
| 39 | <name> |
| 40 | HTTP redirect to http://// (four slashes!) |
| 41 | </name> |
| 42 | <command> |
| 43 | %HOSTIP:%HTTPPORT/want/1142 -L -x http://%HOSTIP:%HTTPPORT |
| 44 | </command> |
| 45 | </client> |
| 46 | |
| 47 | # Verify data after the test has been "shot" |
| 48 | <verify> |
| 49 | <strip> |
| 50 | ^User-Agent:.* |
| 51 | </strip> |
| 52 | <protocol> |
| 53 | GET http://%HOSTIP:%HTTPPORT/want/1142 HTTP/1.1
|
| 54 | Host: %HOSTIP:%HTTPPORT
|
| 55 | Accept: */*
|
| 56 | Proxy-Connection: Keep-Alive
|
| 57 |
|
| 58 | </protocol> |
| 59 | # 3, CURLE_URL_MALFORMAT for the four slashes |
| 60 | <errorcode> |
| 61 | 3 |
| 62 | </errorcode> |
| 63 | </verify> |
| 64 | </testcase> |