Willy Tarreau | 64d70a6 | 2023-11-18 11:01:28 +0100 | [diff] [blame] | 1 | varnishtest "HTTP response size tests: H2->H1 (HTX and legacy mode)" |
| 2 | #REQUIRE_VERSION=1.9 |
| 3 | |
| 4 | feature ignore_unknown_macro |
| 5 | |
| 6 | server s1 { |
| 7 | rxreq |
| 8 | txresp \ |
| 9 | -status 200 \ |
| 10 | -nolen \ |
| 11 | -hdr "Transfer-encoding: chunked" |
| 12 | # -bodylen 16300 |
| 13 | #chunkedlen 16300 |
| 14 | #delay 0.05 |
| 15 | chunkedlen 815 |
| 16 | #delay 0.05 |
| 17 | chunkedlen 815 |
| 18 | delay 0.05 |
| 19 | chunkedlen 815 |
| 20 | #delay 0.05 |
| 21 | chunkedlen 815 |
| 22 | delay 0.05 |
| 23 | |
| 24 | chunkedlen 815 |
| 25 | #delay 0.05 |
| 26 | chunkedlen 815 |
| 27 | delay 0.05 |
| 28 | chunkedlen 815 |
| 29 | #delay 0.05 |
| 30 | chunkedlen 815 |
| 31 | delay 0.05 |
| 32 | |
| 33 | chunkedlen 815 |
| 34 | #delay 0.05 |
| 35 | chunkedlen 815 |
| 36 | delay 0.05 |
| 37 | chunkedlen 815 |
| 38 | #delay 0.05 |
| 39 | chunkedlen 815 |
| 40 | delay 0.05 |
| 41 | |
| 42 | chunkedlen 815 |
| 43 | #delay 0.05 |
| 44 | chunkedlen 815 |
| 45 | delay 0.05 |
| 46 | chunkedlen 815 |
| 47 | #delay 0.05 |
| 48 | chunkedlen 815 |
| 49 | delay 0.05 |
| 50 | |
| 51 | chunkedlen 815 |
| 52 | #delay 0.05 |
| 53 | chunkedlen 815 |
| 54 | delay 0.05 |
| 55 | chunkedlen 815 |
| 56 | #delay 0.05 |
| 57 | chunkedlen 815 |
| 58 | delay 0.05 |
| 59 | } -repeat 2 -start |
| 60 | |
| 61 | haproxy h1 -conf { |
| 62 | defaults |
| 63 | #log stdout format raw daemon |
| 64 | mode http |
| 65 | option http-buffer-request |
| 66 | timeout connect 1s |
| 67 | timeout client 1s |
| 68 | timeout server 1s |
| 69 | |
| 70 | listen feh1 |
| 71 | bind "fd@${feh1}" |
| 72 | bind "fd@${feh2}" proto h2 |
| 73 | http-response add-header a b |
| 74 | #http-response del-header content-length |
| 75 | server s1 ${s1_addr}:${s1_port} |
| 76 | } -start |
| 77 | |
| 78 | client c1h2 -connect ${h1_feh2_sock} { |
| 79 | txpri |
| 80 | stream 0 { |
| 81 | txsettings |
| 82 | rxsettings |
| 83 | txsettings -ack |
| 84 | rxsettings |
| 85 | expect settings.ack == true |
| 86 | } -run |
| 87 | |
| 88 | # first request is valid |
| 89 | stream 1 { |
| 90 | txreq \ |
| 91 | -req "GET" \ |
| 92 | -scheme "https" \ |
| 93 | -url "/test1.html" |
| 94 | rxhdrs |
| 95 | #delay 0.1 |
| 96 | expect resp.status == 200 |
| 97 | rxdata -all |
| 98 | expect resp.bodylen == 16300 |
| 99 | #expext resp.chunkedlen == 16300 |
| 100 | } -run |
| 101 | } -repeat 2 -run |