Imported Upstream version 7.50.2
[platform/upstream/curl.git] / tests / data / test1700
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP/2
7 </keywords>
8 </info>
9
10 #
11 # Server-side
12 <reply>
13 <data nocheck="yes">
14 HTTP/1.1 200 OK
15 Date: Thu, 09 Nov 2010 14:49:00 GMT
16 Server: test-server/fake
17 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
18 ETag: "21025-dc7-39462498"
19 Accept-Ranges: bytes
20 Content-Length: 6
21 Connection: close
22 Content-Type: text/html
23 Funny-head: yesyes
24
25 -foo-
26 </data>
27 <data1>
28 HTTP/1.1 200 OK
29 Date: Thu, 09 Nov 2010 14:49:00 GMT
30 Content-Length: 6
31 Connection: close
32 Content-Type: text/html
33
34 -maa-
35 </data1>
36 </reply>
37
38 #
39 # Client-side
40 <client>
41 <server>
42 http
43 http/2
44 </server>
45  <name>
46 HTTP/2 GET with Upgrade:
47  </name>
48  <command>
49 http://%HOSTIP:%HTTP2PORT/1700 --http2 http://%HOSTIP:%HTTP2PORT/17000001
50 </command>
51 </client>
52
53 #
54 # Verify data after the test has been "shot"
55 <verify>
56 <strip>
57 ^User-Agent:.*
58 ^X-Forwarded-Proto:.*
59 ^Via:.*
60 </strip>
61 <protocol>
62 GET /1700 HTTP/1.1\r
63 Host: %HOSTIP:%HTTP2PORT\r
64 Accept: */*\r
65 \r
66 GET /17000001 HTTP/1.1\r
67 Host: %HOSTIP:%HTTP2PORT\r
68 Accept: */*\r
69 \r
70 </protocol>
71 <stdout>
72 HTTP/1.1 101 Switching Protocols\r
73 Connection: Upgrade\r
74 Upgrade: h2c\r
75 \r
76 HTTP/2 200 \r
77 date: Thu, 09 Nov 2010 14:49:00 GMT\r
78 last-modified: Tue, 13 Jun 2000 12:10:00 GMT\r
79 etag: "21025-dc7-39462498"\r
80 accept-ranges: bytes\r
81 content-length: 6\r
82 content-type: text/html\r
83 funny-head: yesyes\r
84 server: cut-out\r
85 via: 1.1 nghttpx\r
86 \r
87 -foo-
88 HTTP/2 200 \r
89 date: Thu, 09 Nov 2010 14:49:00 GMT\r
90 content-length: 6\r
91 content-type: text/html\r
92 server: cut-out\r
93 via: 1.1 nghttpx\r
94 \r
95 -maa-
96 </stdout>
97 <stripfile>
98 s/^server:.*/server: cut-out\r/
99 </stripfile>
100 </verify>
101 </testcase>