xref: /curl/tests/data/test1908 (revision 1fe081ab)
1<testcase>
2<info>
3<keywords>
4CURLINFO_EFFECTIVE_URL
5</keywords>
6</info>
7
8# Server-side
9<reply>
10<data nocheck="yes">
11HTTP/1.1 200 OK swsbounce
12Date: Tue, 09 Nov 2010 14:49:00 GMT
13Server: test-server/fake
14Content-Type: text/html
15Funny-head: yesyes swsclose
16Content-Length: 0
17alt-svc: h2="3dbbdetxoyw4nsp6c3cc456oj2ays6s43ezxzsfxxri3h5xqd.example:443"; ma=315360000; persist=1
18
19</data>
20
21# This is the second response
22<data1 nocheck="yes">
23HTTP/1.1 200 OK
24Connection: close
25Content-Length: 0
26alt-svc: h2="second.example:443"; ma=315360000;
27
28</data1>
29</reply>
30
31# Client-side
32<client>
33<server>
34http
35</server>
36
37# require debug so that alt-svc can work over plain old HTTP
38<features>
39alt-svc
40debug
41</features>
42<name>
43alt-svc cache save after resetting the handle
44</name>
45<setenv>
46# make debug-curl accept Alt-Svc over plain HTTP
47CURL_ALTSVC_HTTP="yeah"
48</setenv>
49<tool>
50lib%TESTNUMBER
51</tool>
52
53<command>
54%HOSTIP:%HTTPPORT/%TESTNUMBER %LOGDIR/altsvc-%TESTNUMBER
55</command>
56</client>
57
58# Verify data after the test has been "shot"
59<verify>
60<protocol>
61GET /%TESTNUMBER HTTP/1.1
62Host: %HOSTIP:%HTTPPORT
63Accept: */*
64
65GET /%TESTNUMBER HTTP/1.1
66Host: %HOSTIP:%HTTPPORT
67Accept: */*
68
69</protocol>
70<stripfile>
71# strip out the (dynamic) expire date from the file so that the rest
72# matches
73s/\"([^\"]*)\"/TIMESTAMP/
74</stripfile>
75<file name="%LOGDIR/altsvc-%TESTNUMBER" mode="text">
76# Your alt-svc cache. https://curl.se/docs/alt-svc.html
77# This file was generated by libcurl! Edit at your own risk.
78h1 127.0.0.1 %HTTPPORT h2 3dbbdetxoyw4nsp6c3cc456oj2ays6s43ezxzsfxxri3h5xqd.example 443 TIMESTAMP 1 0
79</file>
80</verify>
81</testcase>
82