| 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 | cookies | 
 | 8 | </keywords> | 
 | 9 | </info> | 
 | 10 |  | 
 | 11 | # Server-side | 
 | 12 | <reply> | 
 | 13 | <data> | 
 | 14 | HTTP/1.1 301 This is a weirdo text message
 | 
 | 15 | Date: Tue, 09 Nov 2010 14:49:00 GMT
 | 
 | 16 | Server: test-server/fake
 | 
 | 17 | Location: ../data/%TESTNUMBER0002.txt
 | 
 | 18 | Set-Cookie: firstcookie=want; path=/want/
 | 
 | 19 | Content-Length: 69
 | 
 | 20 | 
 | 
 | 21 | This server reply is for testing a Location: following with cookies | 
 | 22 |  | 
 | 23 | </data> | 
 | 24 | <data2> | 
 | 25 | HTTP/1.1 301 This is a weirdo text message
 | 
 | 26 | Date: Tue, 09 Nov 2010 14:49:00 GMT
 | 
 | 27 | Server: test-server/fake
 | 
 | 28 | Location: ../want/%TESTNUMBER0003.txt
 | 
 | 29 | Set-Cookie: nextcookie=data; path=/data/
 | 
 | 30 | Content-Length: 69
 | 
 | 31 | 
 | 
 | 32 | This server reply is for testing a Location: following with cookies | 
 | 33 |  | 
 | 34 | </data2> | 
 | 35 | <data3> | 
 | 36 | HTTP/1.1 200 Followed here fine
 | 
 | 37 | Date: Tue, 09 Nov 2010 14:49:00 GMT
 | 
 | 38 | Server: test-server/fake
 | 
 | 39 | Content-Length: 52
 | 
 | 40 | 
 | 
 | 41 | If this is received, the location following worked | 
 | 42 |  | 
 | 43 | </data3> | 
 | 44 | <datacheck> | 
 | 45 | HTTP/1.1 301 This is a weirdo text message
 | 
 | 46 | Date: Tue, 09 Nov 2010 14:49:00 GMT
 | 
 | 47 | Server: test-server/fake
 | 
 | 48 | Location: ../data/%TESTNUMBER0002.txt
 | 
 | 49 | Set-Cookie: firstcookie=want; path=/want/
 | 
 | 50 | Content-Length: 69
 | 
 | 51 | 
 | 
 | 52 | HTTP/1.1 301 This is a weirdo text message
 | 
 | 53 | Date: Tue, 09 Nov 2010 14:49:00 GMT
 | 
 | 54 | Server: test-server/fake
 | 
 | 55 | Location: ../want/%TESTNUMBER0003.txt
 | 
 | 56 | Set-Cookie: nextcookie=data; path=/data/
 | 
 | 57 | Content-Length: 69
 | 
 | 58 | 
 | 
 | 59 | HTTP/1.1 200 Followed here fine
 | 
 | 60 | Date: Tue, 09 Nov 2010 14:49:00 GMT
 | 
 | 61 | Server: test-server/fake
 | 
 | 62 | Content-Length: 52
 | 
 | 63 | 
 | 
 | 64 | If this is received, the location following worked | 
 | 65 |  | 
 | 66 | </datacheck> | 
 | 67 | </reply> | 
 | 68 |  | 
 | 69 | # Client-side | 
 | 70 | <client> | 
 | 71 | <server> | 
 | 72 | http | 
 | 73 | </server> | 
 | 74 |  <name> | 
 | 75 | HTTP Location: following with cookies | 
 | 76 |  </name> | 
 | 77 |  <command> | 
 | 78 | http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -c log/jar%TESTNUMBER | 
 | 79 | </command> | 
 | 80 | </client> | 
 | 81 |  | 
 | 82 | # Verify data after the test has been "shot" | 
 | 83 | <verify> | 
 | 84 | <protocol> | 
 | 85 | GET /want/%TESTNUMBER HTTP/1.1
 | 
 | 86 | Host: %HOSTIP:%HTTPPORT
 | 
 | 87 | User-Agent: curl/%VERSION
 | 
 | 88 | Accept: */*
 | 
 | 89 | 
 | 
 | 90 | GET /data/%TESTNUMBER0002.txt HTTP/1.1
 | 
 | 91 | Host: %HOSTIP:%HTTPPORT
 | 
 | 92 | User-Agent: curl/%VERSION
 | 
 | 93 | Accept: */*
 | 
 | 94 | 
 | 
 | 95 | GET /want/%TESTNUMBER0003.txt HTTP/1.1
 | 
 | 96 | Host: %HOSTIP:%HTTPPORT
 | 
 | 97 | User-Agent: curl/%VERSION
 | 
 | 98 | Accept: */*
 | 
 | 99 | Cookie: firstcookie=want
 | 
 | 100 | 
 | 
 | 101 | </protocol> | 
 | 102 | </verify> | 
 | 103 | </testcase> |