xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP/2 |
| 6 | </keywords> |
| 7 | </info> |
| 8 | |
| 9 | # Server-side |
| 10 | <reply> |
| 11 | <data> |
| 12 | HTTP/1.1 101 Switching! |
| 13 | |
| 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 | Content-Length: 6 |
| 19 | Content-Type: text/html |
| 20 | |
| 21 | lies! |
| 22 | </data> |
| 23 | |
| 24 | <datacheck> |
| 25 | HTTP/1.1 101 Switching! |
| 26 | </datacheck> |
| 27 | |
| 28 | # listen to the upgrade request! |
| 29 | <servercmd> |
| 30 | upgrade |
| 31 | </servercmd> |
| 32 | </reply> |
| 33 | |
| 34 | # Client-side |
| 35 | <client> |
| 36 | <server> |
| 37 | http |
| 38 | </server> |
| 39 | <features> |
| 40 | http/2 |
| 41 | </features> |
| 42 | <name> |
| 43 | HTTP/2 upgrade with lying server |
| 44 | </name> |
| 45 | <command> |
| 46 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER --http2 |
| 47 | </command> |
| 48 | |
| 49 | </client> |
| 50 | |
| 51 | <verify> |
| 52 | <protocol> |
| 53 | GET /%TESTNUMBER HTTP/1.1
|
| 54 | Host: %HOSTIP:%HTTPPORT
|
| 55 | User-Agent: curl/%VERSION
|
| 56 | Accept: */*
|
| 57 | Connection: Upgrade, HTTP2-Settings
|
| 58 | Upgrade: %H2CVER
|
| 59 | HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
|
| 60 |
|
| 61 | </protocol> |
| 62 | # CURLE_HTTP2: Send failure: Broken pipe |
| 63 | <errorcode> |
| 64 | 16 |
| 65 | </errorcode> |
| 66 | </verify> |
| 67 | </testcase> |