1<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: Thu, 09 Nov 2010 14:49:00 GMT
15Content-Length: 6
16Connection: close
17Content-Type: text/html
18Funny-head: yesyes
19Alt-Svc: h1="nowhere.foo:81"
20
21-foo-
22</data>
23</reply>
24
25#
26# Client-side
27<client>
28<features>
29debug
30alt-svc
31</features>
32<server>
33http
34</server>
35 <name>
36parse incoming Alt-Svc and save to file
37 </name>
38<setenv>
39# make debug-curl accept Alt-Svc over plain HTTP
40CURL_ALTSVC_HTTP="yeah"
41</setenv>
42 <command>
43http://%HOSTIP:%HTTPPORT/356 --alt-svc "log/altsvc-356"
44</command>
45</client>
46
47#
48# Verify data after the test has been "shot"
49<verify>
50<strip>
51^User-Agent:.*
52</strip>
53<protocol>
54GET /356 HTTP/1.1
55Host: %HOSTIP:%HTTPPORT
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-356">
65# Your alt-svc cache. https://curl.haxx.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>
71