xref: /curl/tests/data/test438 (revision 18f1cd7a)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6Alt-Svc
7HTTP/2
8</keywords>
9</info>
10
11#
12# Server-side
13<reply>
14<data nocheck="yes">
15HTTP/1.1 200 OK
16Date: Tue, 09 Nov 2010 14:49:00 GMT
17Content-Length: 6
18Connection: close
19Content-Type: text/html
20Funny-Head: yesyes
21Alt-Svc: h1="%HOST6IP:%HTTP6PORT", ma=315360000; persist=0
22
23-foo-
24</data>
25</reply>
26
27#
28# Client-side
29<client>
30<features>
31alt-svc
32Debug
33IPv6
34</features>
35<server>
36http
37http-ipv6
38</server>
39<name>
40HTTPS IPv4 GET translated by alt-svc to IPv6 address
41</name>
42<setenv>
43# make debug-curl accept Alt-Svc over plain HTTP
44CURL_ALTSVC_HTTP="yeah"
45</setenv>
46<command>
47--alt-svc "%LOGDIR/altsvc-%TESTNUMBER" "http://%HOSTIP:%HTTPPORT/%TESTNUMBER" "http://%HOSTIP:%HTTPPORT/%TESTNUMBER"
48</command>
49<file name="%LOGDIR/altsvc-%TESTNUMBER">
50h1 %HOSTIP %HTTPPORT h1 %HOST6IP %HTTP6PORT "20290222 22:19:28" 0 0
51</file>
52
53</client>
54
55#
56# Verify data after the test has been "shot"
57<verify>
58<stdout>
59HTTP/1.1 200 OK
60Date: Tue, 09 Nov 2010 14:49:00 GMT
61Content-Length: 6
62Connection: close
63Content-Type: text/html
64Funny-Head: yesyes
65Alt-Svc: h1="%HOST6IP:%HTTP6PORT", ma=315360000; persist=0
66
67-foo-
68HTTP/1.1 200 OK
69Date: Tue, 09 Nov 2010 14:49:00 GMT
70Content-Length: 6
71Connection: close
72Content-Type: text/html
73Funny-Head: yesyes
74Alt-Svc: h1="%HOST6IP:%HTTP6PORT", ma=315360000; persist=0
75
76-foo-
77</stdout>
78<stripfile>
79s/^server: nghttpx.*\r?\n//
80# strip out the (dynamic) expire date from the file so that the rest
81# matches
82s/\"2([^\"]*)\"/TIMESTAMP/
83</stripfile>
84<file name="%LOGDIR/altsvc-%TESTNUMBER" mode="text">
85# Your alt-svc cache. https://curl.se/docs/alt-svc.html
86# This file was generated by libcurl! Edit at your own risk.
87h1 %HOSTIP %HTTPPORT h1 %HOST6IP %HTTP6PORT TIMESTAMP 0 0
88</file>
89</verify>
90</testcase>
91