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