xref: /curl/tests/data/test1702 (revision 3fd80c7b)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP HEAD
6HTTP/2
7</keywords>
8</info>
9
10#
11# Server-side
12<reply>
13<data nocheck="yes">
14HTTP/1.1 200 OK
15Date: Tue, 09 Nov 2010 14:49:00 GMT
16Server: test-server/fake
17Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
18ETag: "21025-dc7-39462498"
19Accept-Ranges: bytes
20Content-Length: 6
21Connection: close
22Content-Type: text/html
23Funny-head: yesyes
24
25</data>
26</reply>
27
28#
29# Client-side
30<client>
31<features>
32h2c
33</features>
34<server>
35http
36http/2
37</server>
38<name>
39HTTP/2 HEAD with Upgrade:
40</name>
41<command>
42http://%HOSTIP:%HTTP2PORT/%TESTNUMBER --http2 --head
43</command>
44</client>
45
46#
47# Verify data after the test has been "shot"
48<verify>
49<strip>
50^X-Forwarded-Proto:.*
51^Via:.*
52</strip>
53<protocol>
54HEAD /%TESTNUMBER HTTP/1.1
55Host: %HOSTIP:%HTTP2PORT
56User-Agent: curl/%VERSION
57Accept: */*
58
59</protocol>
60<stdout>
61HTTP/1.1 101 Switching Protocols
62Connection: Upgrade
63Upgrade: h2c
64
65HTTP/2 200
66date: Tue, 09 Nov 2010 14:49:00 GMT
67last-modified: Tue, 13 Jun 2000 12:10:00 GMT
68etag: "21025-dc7-39462498"
69accept-ranges: bytes
70content-length: 6
71content-type: text/html
72funny-head: yesyes
73via: 1.1 nghttpx
74
75</stdout>
76<stripfile>
77s/^server: nghttpx.*\r?\n//
78</stripfile>
79</verify>
80</testcase>
81