xref: /curl/tests/data/test1701 (revision e61c5eb4)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
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-foo-
26</data>
27</reply>
28
29#
30# Client-side
31<client>
32<features>
33h2c
34</features>
35<server>
36http/2
37</server>
38<name>
39HTTP/2 POST with Upgrade:
40</name>
41<command>
42http://%HOSTIP:%HTTP2PORT/%TESTNUMBER --http2 -d "datatosend"
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 nonewline="yes">
54POST /%TESTNUMBER HTTP/1.1
55Host: %HOSTIP:%HTTP2PORT
56User-Agent: curl/%VERSION
57Accept: */*
58Content-Length: 10
59Content-Type: application/x-www-form-urlencoded
60
61datatosend
62</protocol>
63<stdout>
64HTTP/1.1 101 Switching Protocols
65Connection: Upgrade
66Upgrade: h2c
67
68HTTP/2 200
69date: Tue, 09 Nov 2010 14:49:00 GMT
70last-modified: Tue, 13 Jun 2000 12:10:00 GMT
71etag: "21025-dc7-39462498"
72accept-ranges: bytes
73content-length: 6
74content-type: text/html
75funny-head: yesyes
76via: 1.1 nghttpx
77
78-foo-
79</stdout>
80<stripfile>
81s/^server: nghttpx.*\r?\n//
82</stripfile>
83</verify>
84</testcase>
85