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: 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:-18446744073709551614" 21Alt-Svc: h1="nowhere.foo:81", un-kno22!wn=":82" 22Alt-Svc: h1="nowhere.foo:70000" 23 24-foo- 25</data> 26</reply> 27 28# 29# Client-side 30<client> 31<features> 32debug 33alt-svc 34</features> 35<server> 36http 37</server> 38 <name> 39parse incoming Alt-Svc and save to file 40 </name> 41<setenv> 42# make debug-curl accept Alt-Svc over plain HTTP 43CURL_ALTSVC_HTTP="yeah" 44</setenv> 45 <command> 46http://%HOSTIP:%HTTPPORT/%TESTNUMBER --alt-svc "log/altsvc-%TESTNUMBER" 47</command> 48</client> 49 50# 51# Verify data after the test has been "shot" 52<verify> 53<protocol> 54GET /%TESTNUMBER HTTP/1.1 55Host: %HOSTIP:%HTTPPORT 56User-Agent: curl/%VERSION 57Accept: */* 58 59</protocol> 60<stripfile> 61# strip out the (dynamic) expire date from the file so that the rest 62# matches 63s/\"([^\"]*)\"/TIMESTAMP/ 64</stripfile> 65<file name="log/altsvc-%TESTNUMBER" mode="text"> 66# Your alt-svc cache. https://curl.se/docs/alt-svc.html 67# This file was generated by libcurl! Edit at your own risk. 68h1 %HOSTIP %HTTPPORT h1 nowhere.foo 81 TIMESTAMP 0 0 69</file> 70</verify> 71</testcase> 72