REGTESTS: http-messaging: fix the websocket and upgrade tests not to close early

By default when building an H2 request, vtest sets the END_STREAM flag
on the HEADERS frame. This is problematic with the websocket and proto
upgrade tests since we're using CONNECT, because it immediately closes
afterwards, which does not correspond to what we're testing. Doing this
in abortonclose mode rightfully produces an error. Let's fix the test
so as not to set the flag on the HEADERS frame. However, doing so means
we'll receive a window update that we must also accept. Now the test
works both with and without abortonclose.
This commit is contained in:
Willy Tarreau 2025-10-07 17:03:35 +02:00
parent 8573c5e2a1
commit 687504344a
2 changed files with 14 additions and 5 deletions

View File

@ -232,8 +232,10 @@ client c2_h2 -connect ${hap_frt_h2_sock} {
-scheme "http" \ -scheme "http" \
-url "/" \ -url "/" \
-hdr ":authority" "127.0.0.1" \ -hdr ":authority" "127.0.0.1" \
-hdr ":protocol" "custom_protocol" -hdr ":protocol" "custom_protocol" \
-nostrend
rxwinup
rxhdrs rxhdrs
expect resp.status == 200 expect resp.status == 200
} -run } -run
@ -256,8 +258,10 @@ client c3_h2_h1 -connect ${hap_frt_h2_h1_sock} {
-scheme "http" \ -scheme "http" \
-url "/" \ -url "/" \
-hdr ":authority" "127.0.0.1" \ -hdr ":authority" "127.0.0.1" \
-hdr ":protocol" "custom_protocol" -hdr ":protocol" "custom_protocol" \
-nostrend
rxwinup
rxhdrs rxhdrs
expect resp.status == 200 expect resp.status == 200
} -run } -run
@ -348,7 +352,8 @@ client c9_h2c -connect ${hap_frt_h2_h1_sock} {
-scheme "http" \ -scheme "http" \
-url "/" \ -url "/" \
-hdr ":authority" "127.0.0.1" \ -hdr ":authority" "127.0.0.1" \
-hdr ":protocol" "h2c" -hdr ":protocol" "h2c" \
-nostrend
rxrst rxrst
expect rst.err == 1 expect rst.err == 1

View File

@ -190,8 +190,10 @@ client c4 -connect ${hap_fe3_sock} {
-scheme "http" \ -scheme "http" \
-url "/" \ -url "/" \
-hdr ":authority" "127.0.0.1" \ -hdr ":authority" "127.0.0.1" \
-hdr ":protocol" "websocket" -hdr ":protocol" "websocket" \
-nostrend
rxwinup
rxhdrs rxhdrs
expect resp.status == 200 expect resp.status == 200
} -run } -run
@ -216,8 +218,10 @@ client c5 -connect ${hap_fe4_sock} {
-scheme "http" \ -scheme "http" \
-url "/" \ -url "/" \
-hdr ":authority" "127.0.0.1" \ -hdr ":authority" "127.0.0.1" \
-hdr ":protocol" "websocket" -hdr ":protocol" "websocket" \
-nostrend
rxwinup
rxhdrs rxhdrs
expect resp.status == 502 expect resp.status == 502
} -run } -run