xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP proxy |
| 6 | HSTS |
| 7 | url_effective |
| 8 | </keywords> |
| 9 | </info> |
| 10 | |
| 11 | <reply> |
| 12 | |
| 13 | # we use this as response to a CONNECT |
| 14 | <connect nocheck="yes"> |
| 15 | HTTP/1.1 403 not OK at all
|
| 16 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 17 | Server: test-server/fake
|
| 18 | Content-Length: 6
|
| 19 | Connection: close
|
| 20 | Funny-head: yesyes
|
| 21 |
|
| 22 | -foo- |
| 23 | </connect> |
| 24 | </reply> |
| 25 | |
| 26 | <client> |
| 27 | <server> |
| 28 | http |
| 29 | </server> |
| 30 | <features> |
| 31 | HSTS |
| 32 | proxy |
| 33 | https |
| 34 | </features> |
| 35 | |
| 36 | <file name="log/input%TESTNUMBER"> |
| 37 | .hsts.example "99991001 04:47:41" |
| 38 | </file> |
| 39 | |
| 40 | <name> |
| 41 | HSTS and %{url_effective} after upgrade |
| 42 | </name> |
| 43 | <command> |
| 44 | -x http://%HOSTIP:%HTTPPORT http://this.hsts.example/%TESTNUMBER --hsts log/input%TESTNUMBER -w '%{url_effective}\n' |
| 45 | </command> |
| 46 | </client> |
| 47 | |
| 48 | <verify> |
| 49 | # we let it CONNECT to the server to confirm HSTS but deny from there |
| 50 | <protocol> |
| 51 | CONNECT this.hsts.example:443 HTTP/1.1
|
| 52 | Host: this.hsts.example:443
|
| 53 | User-Agent: curl/%VERSION
|
| 54 | Proxy-Connection: Keep-Alive
|
| 55 |
|
| 56 | </protocol> |
| 57 | <stdout> |
| 58 | HTTP/1.1 403 not OK at all
|
| 59 | Date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 60 | Server: test-server/fake
|
| 61 | Content-Length: 6
|
| 62 | Connection: close
|
| 63 | Funny-head: yesyes
|
| 64 |
|
| 65 | https://this.hsts.example/%TESTNUMBER |
| 66 | </stdout> |
| 67 | # Proxy CONNECT aborted |
| 68 | <errorcode> |
| 69 | 56 |
| 70 | </errorcode> |
| 71 | </verify> |
| 72 | </testcase> |