Created
October 5, 2020 05:01
-
-
Save xquery/624a05b5a920a2fa6833113e7ed9854e to your computer and use it in GitHub Desktop.
curl/tests/data/test360
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<testcase> | |
<info> | |
<keywords> | |
HTTPS | |
HTTPS GET | |
Alt-Svc | |
HTTP/2 | |
</keywords> | |
</info> | |
# | |
# Server-side | |
<reply> | |
<data nocheck="yes"> | |
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 | |
Alt-Svc: h2=":%HTTP2PORT", ma=315360000; persist=0 | |
-foo- | |
</data> | |
</reply> | |
# | |
# Client-side | |
<client> | |
<features> | |
alt-svc | |
debug | |
</features> | |
<server> | |
http | |
https | |
http/2 | |
</server> | |
<name> | |
HTTPS GET translated by alt-svc lookup to HTTP/2 GET | |
</name> | |
<setenv> | |
# make debug-curl accept Alt-Svc over plain HTTP | |
CURL_ALTSVC_HTTP="yeah" | |
</setenv> | |
<command> | |
--http2 --alt-svc "log/altsvc-360" "http://%HOSTIP:%HTTPSPORT/360" "http://%HOSTIP:%HTTPSPORT/360" | |
</command> | |
</client> | |
# | |
# Verify data after the test has been "shot" | |
<verify> | |
<stripfile> | |
# strip out the (dynamic) expire date from the file so that the rest | |
# matches | |
s/\"2([^\"]*)\"/TIMESTAMP/ | |
</stripfile> | |
<file name="log/altsvc-360" mode="text"> | |
# Your alt-svc cache. https://curl.haxx.se/docs/alt-svc.html | |
# This file was generated by libcurl! Edit at your own risk. | |
h2 %HOSTIP %HTTPSPORT h2 %HOSTIP %HTTP2PORT TIMESTAMP 0 0 | |
</file> | |
</verify> | |
</testcase> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment