xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | </keywords> |
| 7 | </info> |
| 8 | # Server-side |
| 9 | <reply> |
| 10 | <data> |
| 11 | HTTP/1.1 301 This is a weirdo text message swsclose |
| 12 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 13 | Server: test-server/fake |
| 14 | Location: /online/1,1795,Welcome,00.html/%TESTNUMBER0002.txt?logout=TRUE |
| 15 | Connection: close |
| 16 | |
| 17 | This server reply is for testing a simple Location: following |
| 18 | |
| 19 | </data> |
| 20 | <data2> |
| 21 | HTTP/1.1 200 Followed here fine swsclose |
| 22 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 23 | Server: test-server/fake |
| 24 | Content-Length: 52 |
| 25 | |
| 26 | If this is received, the location following worked |
| 27 | |
| 28 | </data2> |
| 29 | <datacheck> |
| 30 | HTTP/1.1 301 This is a weirdo text message swsclose |
| 31 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 32 | Server: test-server/fake |
| 33 | %if hyper |
| 34 | Location: /online/1,1795,Welcome,00.html/%TESTNUMBER0002.txt?logout=TRUE |
| 35 | %else |
| 36 | Location: /online/1,1795,Welcome,00.html/%TESTNUMBER0002.txt?logout=TRUE |
| 37 | %endif |
| 38 | Connection: close |
| 39 | |
| 40 | HTTP/1.1 200 Followed here fine swsclose |
| 41 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 42 | Server: test-server/fake |
| 43 | Content-Length: 52 |
| 44 | |
| 45 | If this is received, the location following worked |
| 46 | |
| 47 | </datacheck> |
| 48 | </reply> |
| 49 | |
| 50 | # Client-side |
| 51 | <client> |
| 52 | <server> |
| 53 | http |
| 54 | </server> |
| 55 | <name> |
| 56 | HTTP Location: following with extra spaces in header |
| 57 | </name> |
| 58 | <command> |
| 59 | http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L |
| 60 | </command> |
| 61 | </client> |
| 62 | |
| 63 | # Verify data after the test has been "shot" |
| 64 | <verify> |
| 65 | <protocol> |
| 66 | GET /want/%TESTNUMBER HTTP/1.1
|
| 67 | Host: %HOSTIP:%HTTPPORT
|
| 68 | User-Agent: curl/%VERSION
|
| 69 | Accept: */*
|
| 70 |
|
| 71 | GET /online/1,1795,Welcome,00.html/%TESTNUMBER0002.txt?logout=TRUE HTTP/1.1
|
| 72 | Host: %HOSTIP:%HTTPPORT
|
| 73 | User-Agent: curl/%VERSION
|
| 74 | Accept: */*
|
| 75 |
|
| 76 | </protocol> |
| 77 | </verify> |
| 78 | </testcase> |