| xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | <testcase> | 
 | 2 | # Test case inspired by this question on stackoverflow: | 
 | 3 | # | 
 | 4 | # https://stackoverflow.com/questions/10017165/use-libcurl-with-bluecoat-cookie-proxy | 
 | 5 | # | 
 | 6 | <info> | 
 | 7 | <keywords> | 
 | 8 | HTTP | 
 | 9 | HTTP GET | 
 | 10 | HTTP proxy | 
 | 11 | cookies | 
 | 12 | </keywords> | 
 | 13 | </info> | 
 | 14 |  | 
 | 15 | # Server-side | 
 | 16 | <reply> | 
 | 17 | <data> | 
 | 18 | HTTP/1.1 407 Me not know you swsbounce
 | 
 | 19 | Date: Tue, 25 Sep 2001 19:37:44 GMT
 | 
 | 20 | Content-Type: text/html
 | 
 | 21 | Set-Cookie: proxycookie=weirdo; Path=/
 | 
 | 22 | Cache-control: private
 | 
 | 23 | Content-Length: 62
 | 
 | 24 | Proxy-Authenticate: Basic realm="moo on you"
 | 
 | 25 | 
 | 
 | 26 | This server reply is for testing a simple cookie test case... | 
 | 27 | </data> | 
 | 28 |  | 
 | 29 | <data1> | 
 | 30 | HTTP/1.1 200 Fine!
 | 
 | 31 | Content-Type: text/html
 | 
 | 32 | Content-Length: 6
 | 
 | 33 | 
 | 
 | 34 | hello | 
 | 35 | </data1> | 
 | 36 |  | 
 | 37 | <datacheck> | 
 | 38 | HTTP/1.1 407 Me not know you swsbounce
 | 
 | 39 | Date: Tue, 25 Sep 2001 19:37:44 GMT
 | 
 | 40 | Content-Type: text/html
 | 
 | 41 | Set-Cookie: proxycookie=weirdo; Path=/
 | 
 | 42 | Cache-control: private
 | 
 | 43 | Content-Length: 62
 | 
 | 44 | Proxy-Authenticate: Basic realm="moo on you"
 | 
 | 45 | 
 | 
 | 46 | HTTP/1.1 200 Fine!
 | 
 | 47 | Content-Type: text/html
 | 
 | 48 | Content-Length: 6
 | 
 | 49 | 
 | 
 | 50 | hello | 
 | 51 | </datacheck> | 
 | 52 |  | 
 | 53 |  | 
 | 54 | </reply> | 
 | 55 |  | 
 | 56 | # Client-side | 
 | 57 | <client> | 
 | 58 | <server> | 
 | 59 | http | 
 | 60 | </server> | 
 | 61 |  <name> | 
 | 62 | HTTP --proxy-anyauth and 407 with cookies | 
 | 63 |  </name> | 
 | 64 |  <command> | 
 | 65 | -U myname:mypassword -x %HOSTIP:%HTTPPORT http://z.x.com/%TESTNUMBER --proxy-anyauth -c log/dump%TESTNUMBER | 
 | 66 | </command> | 
 | 67 | <features> | 
 | 68 | proxy | 
 | 69 | </features> | 
 | 70 | </client> | 
 | 71 |  | 
 | 72 | # Verify data after the test has been "shot" | 
 | 73 | <verify> | 
 | 74 | <protocol> | 
 | 75 | GET http://z.x.com/%TESTNUMBER HTTP/1.1
 | 
 | 76 | Host: z.x.com
 | 
 | 77 | User-Agent: curl/%VERSION
 | 
 | 78 | Accept: */*
 | 
 | 79 | Proxy-Connection: Keep-Alive
 | 
 | 80 | 
 | 
 | 81 | GET http://z.x.com/%TESTNUMBER HTTP/1.1
 | 
 | 82 | Host: z.x.com
 | 
 | 83 | Proxy-Authorization: Basic bXluYW1lOm15cGFzc3dvcmQ=
 | 
 | 84 | User-Agent: curl/%VERSION
 | 
 | 85 | Accept: */*
 | 
 | 86 | Proxy-Connection: Keep-Alive
 | 
 | 87 | Cookie: proxycookie=weirdo
 | 
 | 88 | 
 | 
 | 89 | </protocol> | 
 | 90 | </verify> | 
 | 91 | </testcase> |