blob: 9f6459487c3db78297dfa978875087b1048ae2e7 [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001<testcase>
2<info>
3<keywords>
4HTTP
5Alt-Svc
6</keywords>
7</info>
8
9#
10# Server-side
11<reply>
12<data>
13HTTP/1.1 200 OK
14Date: Tue, 09 Nov 2010 14:49:00 GMT
15Content-Length: 6
16Connection: close
17Content-Type: text/html
18Funny-head: yesyes
19Alt-Svc: h1="nowhere.foo:-1"
20Alt-Svc: h1="nowhere.foo:81", un-kno22!wn=":82"
21Alt-Svc: h1="nowhere.foo:70000"
22
23-foo-
24</data>
25</reply>
26
27#
28# Client-side
29<client>
30<features>
31debug
32alt-svc
33</features>
34<server>
35http
36</server>
37 <name>
38parse incoming Alt-Svc and save to file
39 </name>
40<setenv>
41# make debug-curl accept Alt-Svc over plain HTTP
42CURL_ALTSVC_HTTP="yeah"
43</setenv>
44 <command>
45http://%HOSTIP:%HTTPPORT/%TESTNUMBER --alt-svc "log/altsvc-%TESTNUMBER"
46</command>
47</client>
48
49#
50# Verify data after the test has been "shot"
51<verify>
52<protocol>
53GET /%TESTNUMBER HTTP/1.1
54Host: %HOSTIP:%HTTPPORT
55User-Agent: curl/%VERSION
56Accept: */*
57
58</protocol>
59<stripfile>
60# strip out the (dynamic) expire date from the file so that the rest
61# matches
62s/\"([^\"]*)\"/TIMESTAMP/
63</stripfile>
64<file name="log/altsvc-%TESTNUMBER" mode="text">
65# Your alt-svc cache. https://curl.se/docs/alt-svc.html
66# This file was generated by libcurl! Edit at your own risk.
67h1 %HOSTIP %HTTPPORT h1 nowhere.foo 81 TIMESTAMP 0 0
68</file>
69</verify>
70</testcase>