test2305: send 3 frames, 4097 bytes each, as one message

Receive them using a 256 bytes buffer in a loop.
This commit is contained in:
Daniel Stenberg 2023-02-08 13:17:41 +01:00
parent 2e2e3d16c5
commit 5a9a04d556
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 171 additions and 2 deletions

View file

@ -77,6 +77,7 @@
1943
2301
2302
2305
%endif
2043
# Tests that are disabled here for rustls are SUPPOSED to work

View file

@ -242,7 +242,7 @@ test2100 \
\
test2200 test2201 test2202 test2203 test2204 test2205 \
\
test2300 test2301 test2302 test2303 test2304 \
test2300 test2301 test2302 test2303 test2304 test2305 \
\
test2400 test2401 test2402 \
\

59
tests/data/test2305 Normal file
View file

@ -0,0 +1,59 @@
<testcase>
<info>
<keywords>
WebSockets
</keywords>
</info>
#
# Sends three 4097 bytes TEXT frames, as one single message
<reply>
<data nocheck="yes">
HTTP/1.1 101 Switching to WebSockets
Server: test-server/fake
Upgrade: websocket
Connection: Upgrade
Something: else
Sec-WebSocket-Accept: HkPsVga7+8LuxM4RGQ5p9tZHeYs=
%hex[%01%7e%10%01]hex%%repeat[256 x helothisisdaniel]%
%hex[%01%7e%10%01]hex%%repeat[256 x helothisisdaniel]%
%hex[%81%7e%10%01]hex%%repeat[256 x helothisisdaniel]%
</data>
# allow upgrade
<servercmd>
upgrade
</servercmd>
</reply>
#
# Client-side
<client>
# require debug for the forced CURL_ENTROPY
<features>
debug
ws
</features>
<server>
http
</server>
<name>
WebSocket curl_ws_recv() loop reading three larger frames
</name>
<tool>
lib%TESTNUMBER
</tool>
<command>
ws://%HOSTIP:%HTTPPORT/%TESTNUMBER log/save%TESTNUMBER
</command>
</client>
#
<verify>
<file name="log/save%TESTNUMBER">
%repeat[256 x helothisisdaniel]%
%repeat[256 x helothisisdaniel]%
%repeat[256 x helothisisdaniel]%
</file>
</verify>
</testcase>