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 set cookie |
| 7 | cookies |
| 8 | CURLOPT_REFERER |
| 9 | curl_easy_reset |
| 10 | </keywords> |
| 11 | </info> |
| 12 | # |
| 13 | # Server-side |
| 14 | <reply> |
| 15 | <data> |
| 16 | HTTP/1.1 200 OK
|
| 17 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 18 | Content-Length: 6
|
| 19 | Connection: close
|
| 20 | Content-Type: text/html
|
| 21 |
|
| 22 | -foo- |
| 23 | </data> |
| 24 | |
| 25 | # since the request runs twice |
| 26 | <datacheck> |
| 27 | HTTP/1.1 200 OK
|
| 28 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 29 | Content-Length: 6
|
| 30 | Connection: close
|
| 31 | Content-Type: text/html
|
| 32 |
|
| 33 | -foo- |
| 34 | HTTP/1.1 200 OK
|
| 35 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 36 | Content-Length: 6
|
| 37 | Connection: close
|
| 38 | Content-Type: text/html
|
| 39 |
|
| 40 | -foo- |
| 41 | </datacheck> |
| 42 | |
| 43 | </reply> |
| 44 | |
| 45 | # Client-side |
| 46 | <client> |
| 47 | <file name="log/cookies676"> |
| 48 | %HOSTIP TRUE /we/want/ FALSE 2118138987 proven yes |
| 49 | </file> |
| 50 | <server> |
| 51 | http |
| 52 | </server> |
| 53 | # tool is what to use instead of 'curl' |
| 54 | <tool> |
| 55 | lib%TESTNUMBER |
| 56 | </tool> |
| 57 | |
| 58 | <name> |
| 59 | verify setting CURLOPT_COOKIEFILE to NULL again |
| 60 | </name> |
| 61 | <command> |
| 62 | http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER |
| 63 | </command> |
| 64 | </client> |
| 65 | |
| 66 | # |
| 67 | # Verify data after the test has been "shot" |
| 68 | <verify> |
| 69 | <protocol> |
| 70 | GET /we/want/%TESTNUMBER HTTP/1.1
|
| 71 | Host: %HOSTIP:%HTTPPORT
|
| 72 | User-Agent: the-moo agent next generation
|
| 73 | Accept: */*
|
| 74 | Cookie: proven=yes
|
| 75 |
|
| 76 | GET /we/want/%TESTNUMBER HTTP/1.1
|
| 77 | Host: %HOSTIP:%HTTPPORT
|
| 78 | User-Agent: the-moo agent next generation
|
| 79 | Accept: */*
|
| 80 |
|
| 81 | </protocol> |
| 82 | </verify> |
| 83 | </testcase> |