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