2019-03-03 18:17:52 +08:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
Alt-Svc
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
|
|
|
Content-Length: 6
|
|
|
|
Connection: close
|
|
|
|
Content-Type: text/html
|
|
|
|
Funny-head: yesyes
|
2019-08-02 19:46:49 +08:00
|
|
|
Alt-Svc: h1="nowhere.foo:81", un-kno22!wn=":82"
|
2019-03-03 18:17:52 +08: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 22:19:50 +08:00
|
|
|
</setenv>
|
2019-03-03 18:17:52 +08:00
|
|
|
<command>
|
|
|
|
http://%HOSTIP:%HTTPPORT/356 --alt-svc "log/altsvc-356"
|
|
|
|
</command>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol>
|
|
|
|
GET /356 HTTP/1.1
|
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2019-03-03 18:17:52 +08:00
|
|
|
Accept: */*
|
|
|
|
|
|
|
|
</protocol>
|
|
|
|
<stripfile>
|
|
|
|
# strip out the (dynamic) expire date from the file so that the rest
|
|
|
|
# matches
|
|
|
|
s/\"([^\"]*)\"/TIMESTAMP/
|
|
|
|
</stripfile>
|
2019-10-16 05:37:20 +08:00
|
|
|
<file name="log/altsvc-356" mode="text">
|
2020-11-04 21:02:01 +08:00
|
|
|
# Your alt-svc cache. https://curl.se/docs/alt-svc.html
|
2019-03-03 18:17:52 +08: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>
|