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", un-kno22!wn=":82" 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<protocol> 51GET /356 HTTP/1.1 52Host: %HOSTIP:%HTTPPORT 53User-Agent: curl/%VERSION 54Accept: */* 55 56</protocol> 57<stripfile> 58# strip out the (dynamic) expire date from the file so that the rest 59# matches 60s/\"([^\"]*)\"/TIMESTAMP/ 61</stripfile> 62<file name="log/altsvc-356" mode="text"> 63# Your alt-svc cache. https://curl.haxx.se/docs/alt-svc.html 64# This file was generated by libcurl! Edit at your own risk. 65h1 %HOSTIP %HTTPPORT h1 nowhere.foo 81 TIMESTAMP 0 0 66</file> 67</verify> 68</testcase> 69