|
| 1 | +# |
| 2 | +# Copyright 2021-2024 Aklivity Inc. |
| 3 | +# |
| 4 | +# Aklivity licenses this file to you under the Apache License, |
| 5 | +# version 2.0 (the "License"); you may not use this file except in compliance |
| 6 | +# with the License. You may obtain a copy of the License at: |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | +# License for the specific language governing permissions and limitations |
| 14 | +# under the License. |
| 15 | +# |
| 16 | + |
| 17 | +connect "zilla://streams/net0" |
| 18 | + option zilla:window 8192 |
| 19 | + option zilla:transmission "duplex" |
| 20 | +connected |
| 21 | + |
| 22 | +# client connection preface |
| 23 | +write "PRI * HTTP/2.0\r\n" |
| 24 | + "\r\n" |
| 25 | + "SM\r\n" |
| 26 | + "\r\n" |
| 27 | +write flush |
| 28 | + |
| 29 | +# server connection preface - SETTINGS frame |
| 30 | +read [0x00 0x00 0x12] # length = 18 |
| 31 | + [0x04] # HTTP2 SETTINGS frame |
| 32 | + [0x00] # flags = 0x00 |
| 33 | + [0x00 0x00 0x00 0x00] # stream_id = 0 |
| 34 | + [0x00 0x03 0x00 0x00 0x00 0x64] # SETTINGS_MAX_CONCURRENT_STREAMS(0x03) = 100 |
| 35 | + [0x00 0x04 0x00 0x00 0x00 0x00] # SETTINGS_INITIAL_WINDOW_SIZE(0x04) = 0 |
| 36 | + [0x00 0x06 0x00 0x00 0x20 0x00] # SETTINGS_MAX_HEADER_LIST_SIZE(0x06) = 8192 |
| 37 | + |
| 38 | +write [0x00 0x00 0x0c] # length = 12 |
| 39 | + [0x04] # HTTP2 SETTINGS frame |
| 40 | + [0x00] # flags = 0x00 |
| 41 | + [0x00 0x00 0x00 0x00] # stream_id = 0 |
| 42 | + [0x00 0x03 0x00 0x00 0x00 0x64] # SETTINGS_MAX_CONCURRENT_STREAMS(0x03) = 100 |
| 43 | + [0x00 0x04 0x00 0x00 0xff 0xff] # SETTINGS_INITIAL_WINDOW_SIZE(0x04) = 65535 |
| 44 | +write flush |
| 45 | + |
| 46 | +read [0x00 0x00 0x00] # length = 0 |
| 47 | + [0x04] # HTTP2 SETTINGS frame |
| 48 | + [0x01] # ACK |
| 49 | + [0x00 0x00 0x00 0x00] # stream_id = 0 |
| 50 | + |
| 51 | +write [0x00 0x00 0x13] # length = 19 |
| 52 | + [0x01] # HEADERS frame |
| 53 | + [0x05] # END_STREAM | END_HEADERS |
| 54 | + [0x00 0x00 0x00 0x01] # stream_id = 1 |
| 55 | + [0x82] # :method: GET |
| 56 | + [0x86] # :scheme: http |
| 57 | + [0x84] # :path: / |
| 58 | + [0x01] [0x0e] "localhost:8080" # :authority: localhost:8080 |
| 59 | +write flush |
| 60 | + |
| 61 | +write [0x00 0x00 0x00] # length = 0 |
| 62 | + [0x04] # HTTP2 SETTINGS frame |
| 63 | + [0x01] # ACK |
| 64 | + [0x00 0x00 0x00 0x00] # stream_id = 0 |
| 65 | +write flush |
| 66 | + |
| 67 | +read await RESPONSE_STARTED |
| 68 | + |
| 69 | +write close |
0 commit comments