xref: /curl/tests/data/test446 (revision 18f1cd7a)
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<testcase>
3<info>
4<keywords>
5HTTP
6HTTP proxy
7HSTS
8trailing-dot
9</keywords>
10</info>
11
12<reply>
13
14# we use this as response to a CONNECT
15<connect nocheck="yes">
16HTTP/1.1 200 OK
17
18</connect>
19<data crlf="yes">
20HTTP/1.1 200 OK
21Content-Length: 6
22Strict-Transport-Security: max-age=604800
23
24-foo-
25</data>
26<data2 crlf="yes">
27HTTP/1.1 200 OK
28Content-Length: 6
29Strict-Transport-Security: max-age=6048000
30
31-baa-
32</data2>
33</reply>
34
35<client>
36<server>
37https
38http-proxy
39</server>
40<features>
41HSTS
42proxy
43https
44Debug
45</features>
46<setenv>
47CURL_HSTS_HTTP=yes
48CURL_TIME=2000000000
49</setenv>
50
51<name>
52HSTS with two URLs
53</name>
54<command>
55-x http://%HOSTIP:%PROXYPORT --hsts %LOGDIR/hsts%TESTNUMBER http://this.hsts.example./%TESTNUMBER http://another.example.com/%TESTNUMBER0002
56</command>
57</client>
58
59<verify>
60# we let it CONNECT to the server to confirm HSTS but deny from there
61<proxy crlf="yes">
62GET http://this.hsts.example./%TESTNUMBER HTTP/1.1
63Host: this.hsts.example.
64User-Agent: curl/%VERSION
65Accept: */*
66Proxy-Connection: Keep-Alive
67
68GET http://another.example.com/%TESTNUMBER0002 HTTP/1.1
69Host: another.example.com
70User-Agent: curl/%VERSION
71Accept: */*
72Proxy-Connection: Keep-Alive
73
74</proxy>
75
76<file name="%LOGDIR/hsts%TESTNUMBER" mode="text">
77# Your HSTS cache. https://curl.se/docs/hsts.html
78# This file was generated by libcurl! Edit at your own risk.
79this.hsts.example "20330525 03:33:20"
80another.example.com "20330727 03:33:20"
81</file>
82
83</verify>
84</testcase>
85