2019-03-03 05:17:52 -05:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
Alt-Svc
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
|
|
|
HTTP/1.1 200 OK
|
2020-02-28 09:00:03 -05:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2019-03-03 05:17:52 -05:00
|
|
|
Content-Length: 6
|
|
|
|
Connection: close
|
|
|
|
Content-Type: text/html
|
|
|
|
Funny-head: yesyes
|
2019-08-02 07:46:49 -04:00
|
|
|
Alt-Svc: h1="nowhere.foo:81", un-kno22!wn=":82"
|
2019-03-03 05:17:52 -05:00
|
|
|
|
|
|
|
-foo-
|
|
|
|
</data>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<features>
|
|
|
|
debug
|
|
|
|
alt-svc
|
|
|
|
</features>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
parse incoming Alt-Svc and save to file
|
|
|
|
</name>
|
|
|
|
<setenv>
|
|
|
|
# make debug-curl accept Alt-Svc over plain HTTP
|
|
|
|
CURL_ALTSVC_HTTP="yeah"
|
2019-03-24 10:19:50 -04:00
|
|
|
</setenv>
|
2019-03-03 05:17:52 -05:00
|
|
|
<command>
|
2021-03-12 11:38:26 -05:00
|
|
|
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --alt-svc "log/altsvc-%TESTNUMBER"
|
2019-03-03 05:17:52 -05:00
|
|
|
</command>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol>
|
2021-03-12 11:38:26 -05:00
|
|
|
GET /%TESTNUMBER HTTP/1.1
|
2019-03-03 05:17:52 -05:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 07:45:24 -04:00
|
|
|
User-Agent: curl/%VERSION
|
2019-03-03 05:17:52 -05:00
|
|
|
Accept: */*
|
|
|
|
|
|
|
|
</protocol>
|
|
|
|
<stripfile>
|
|
|
|
# strip out the (dynamic) expire date from the file so that the rest
|
|
|
|
# matches
|
|
|
|
s/\"([^\"]*)\"/TIMESTAMP/
|
|
|
|
</stripfile>
|
2021-03-12 11:38:26 -05:00
|
|
|
<file name="log/altsvc-%TESTNUMBER" mode="text">
|
2020-11-04 08:02:01 -05:00
|
|
|
# Your alt-svc cache. https://curl.se/docs/alt-svc.html
|
2019-03-03 05:17:52 -05:00
|
|
|
# This file was generated by libcurl! Edit at your own risk.
|
|
|
|
h1 %HOSTIP %HTTPPORT h1 nowhere.foo 81 TIMESTAMP 0 0
|
|
|
|
</file>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|