mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-10-27 22:51:02 +01:00
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:
parent
8573c5e2a1
commit
687504344a
@ -232,8 +232,10 @@ client c2_h2 -connect ${hap_frt_h2_sock} {
|
||||
-scheme "http" \
|
||||
-url "/" \
|
||||
-hdr ":authority" "127.0.0.1" \
|
||||
-hdr ":protocol" "custom_protocol"
|
||||
-hdr ":protocol" "custom_protocol" \
|
||||
-nostrend
|
||||
|
||||
rxwinup
|
||||
rxhdrs
|
||||
expect resp.status == 200
|
||||
} -run
|
||||
@ -256,8 +258,10 @@ client c3_h2_h1 -connect ${hap_frt_h2_h1_sock} {
|
||||
-scheme "http" \
|
||||
-url "/" \
|
||||
-hdr ":authority" "127.0.0.1" \
|
||||
-hdr ":protocol" "custom_protocol"
|
||||
-hdr ":protocol" "custom_protocol" \
|
||||
-nostrend
|
||||
|
||||
rxwinup
|
||||
rxhdrs
|
||||
expect resp.status == 200
|
||||
} -run
|
||||
@ -348,7 +352,8 @@ client c9_h2c -connect ${hap_frt_h2_h1_sock} {
|
||||
-scheme "http" \
|
||||
-url "/" \
|
||||
-hdr ":authority" "127.0.0.1" \
|
||||
-hdr ":protocol" "h2c"
|
||||
-hdr ":protocol" "h2c" \
|
||||
-nostrend
|
||||
|
||||
rxrst
|
||||
expect rst.err == 1
|
||||
|
||||
@ -190,8 +190,10 @@ client c4 -connect ${hap_fe3_sock} {
|
||||
-scheme "http" \
|
||||
-url "/" \
|
||||
-hdr ":authority" "127.0.0.1" \
|
||||
-hdr ":protocol" "websocket"
|
||||
-hdr ":protocol" "websocket" \
|
||||
-nostrend
|
||||
|
||||
rxwinup
|
||||
rxhdrs
|
||||
expect resp.status == 200
|
||||
} -run
|
||||
@ -216,8 +218,10 @@ client c5 -connect ${hap_fe4_sock} {
|
||||
-scheme "http" \
|
||||
-url "/" \
|
||||
-hdr ":authority" "127.0.0.1" \
|
||||
-hdr ":protocol" "websocket"
|
||||
-hdr ":protocol" "websocket" \
|
||||
-nostrend
|
||||
|
||||
rxwinup
|
||||
rxhdrs
|
||||
expect resp.status == 502
|
||||
} -run
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user