xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP GET |
| 6 | followlocation |
| 7 | --write-out |
| 8 | </keywords> |
| 9 | </info> |
| 10 | |
| 11 | # |
| 12 | # Server-side |
| 13 | <reply> |
| 14 | <data nocheck="yes"> |
| 15 | HTTP/1.1 302 OK swsbounce swsclose
|
| 16 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 17 | Content-Length: 8
|
| 18 | Connection: close
|
| 19 | Content-Type: text/plain
|
| 20 | Location: ./%TESTNUMBER0001
|
| 21 |
|
| 22 | monster |
| 23 | </data> |
| 24 | <data1 nocheck="yes"> |
| 25 | HTTP/1.1 200 OK
|
| 26 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 27 | Content-Length: 15
|
| 28 | Connection: close
|
| 29 | Content-Type: text/plain; charset=us-ascii
|
| 30 |
|
| 31 | bigger monster |
| 32 | </data1> |
| 33 | |
| 34 | </reply> |
| 35 | |
| 36 | # |
| 37 | # Client-side |
| 38 | <client> |
| 39 | <server> |
| 40 | http |
| 41 | </server> |
| 42 | <name> |
| 43 | HTTP POST redirected to GET and --write-out method |
| 44 | </name> |
| 45 | <command> |
| 46 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w "%{method}\n" -L -d "twinkle twinkle little star" |
| 47 | </command> |
| 48 | </client> |
| 49 | |
| 50 | # |
| 51 | # Verify data after the test has been "shot" |
| 52 | <verify> |
| 53 | <protocol> |
| 54 | POST /%TESTNUMBER HTTP/1.1
|
| 55 | Host: %HOSTIP:%HTTPPORT
|
| 56 | User-Agent: curl/%VERSION
|
| 57 | Accept: */*
|
| 58 | Content-Length: 27
|
| 59 | Content-Type: application/x-www-form-urlencoded
|
| 60 |
|
| 61 | twinkle twinkle little starGET /%TESTNUMBER0001 HTTP/1.1
|
| 62 | Host: %HOSTIP:%HTTPPORT
|
| 63 | User-Agent: curl/%VERSION
|
| 64 | Accept: */*
|
| 65 |
|
| 66 | </protocol> |
| 67 | |
| 68 | <stdout> |
| 69 | HTTP/1.1 302 OK swsbounce swsclose
|
| 70 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 71 | Content-Length: 8
|
| 72 | Connection: close
|
| 73 | Content-Type: text/plain
|
| 74 | Location: ./%TESTNUMBER0001
|
| 75 |
|
| 76 | HTTP/1.1 200 OK
|
| 77 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 78 | Content-Length: 15
|
| 79 | Connection: close
|
| 80 | Content-Type: text/plain; charset=us-ascii
|
| 81 |
|
| 82 | bigger monster |
| 83 | GET |
| 84 | </stdout> |
| 85 | |
| 86 | </verify> |
| 87 | </testcase> |