xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 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: 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 | <data1> |
| 28 | HTTP/1.1 200 OK
|
| 29 | Date: Tue, 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 | <features> |
| 42 | h2c |
| 43 | </features> |
| 44 | <server> |
| 45 | http |
| 46 | http/2 |
| 47 | </server> |
| 48 | <name> |
| 49 | HTTP/2 GET with Upgrade: |
| 50 | </name> |
| 51 | <command> |
| 52 | http://%HOSTIP:%HTTP2PORT/%TESTNUMBER --http2 http://%HOSTIP:%HTTP2PORT/%TESTNUMBER0001 |
| 53 | </command> |
| 54 | </client> |
| 55 | |
| 56 | # |
| 57 | # Verify data after the test has been "shot" |
| 58 | <verify> |
| 59 | <strip> |
| 60 | ^X-Forwarded-Proto:.* |
| 61 | ^Via:.* |
| 62 | </strip> |
| 63 | <protocol> |
| 64 | GET /%TESTNUMBER HTTP/1.1
|
| 65 | Host: %HOSTIP:%HTTP2PORT
|
| 66 | User-Agent: curl/%VERSION
|
| 67 | Accept: */*
|
| 68 |
|
| 69 | GET /%TESTNUMBER0001 HTTP/1.1
|
| 70 | Host: %HOSTIP:%HTTP2PORT
|
| 71 | User-Agent: curl/%VERSION
|
| 72 | Accept: */*
|
| 73 |
|
| 74 | </protocol> |
| 75 | <stdout> |
| 76 | HTTP/1.1 101 Switching Protocols
|
| 77 | Connection: Upgrade
|
| 78 | Upgrade: h2c
|
| 79 |
|
| 80 | HTTP/2 200
|
| 81 | date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 82 | last-modified: Tue, 13 Jun 2000 12:10:00 GMT
|
| 83 | etag: "21025-dc7-39462498"
|
| 84 | accept-ranges: bytes
|
| 85 | content-length: 6
|
| 86 | content-type: text/html
|
| 87 | funny-head: yesyes
|
| 88 | via: 1.1 nghttpx
|
| 89 |
|
| 90 | -foo- |
| 91 | HTTP/2 200
|
| 92 | date: Tue, 09 Nov 2010 14:49:00 GMT
|
| 93 | content-length: 6
|
| 94 | content-type: text/html
|
| 95 | via: 1.1 nghttpx
|
| 96 |
|
| 97 | -maa- |
| 98 | </stdout> |
| 99 | <stripfile> |
| 100 | s/^server: nghttpx.*\r?\n// |
| 101 | </stripfile> |
| 102 | </verify> |
| 103 | </testcase> |