xref: /third_party/curl/tests/data/test2304 (revision 13498266)
113498266Sopenharmony_ci<testcase>
213498266Sopenharmony_ci<info>
313498266Sopenharmony_ci<keywords>
413498266Sopenharmony_ciWebSockets
513498266Sopenharmony_ci</keywords>
613498266Sopenharmony_ci</info>
713498266Sopenharmony_ci
813498266Sopenharmony_ci#
913498266Sopenharmony_ci# Sends a PING + a 5 byte hello TEXT
1013498266Sopenharmony_ci<reply>
1113498266Sopenharmony_ci<data nocheck="yes" nonewline="yes">
1213498266Sopenharmony_ciHTTP/1.1 101 Switching to WebSockets swsclose
1313498266Sopenharmony_ciServer: test-server/fake
1413498266Sopenharmony_ciUpgrade: websocket
1513498266Sopenharmony_ciConnection: Upgrade
1613498266Sopenharmony_ciSomething: else
1713498266Sopenharmony_ciSec-WebSocket-Accept: HkPsVga7+8LuxM4RGQ5p9tZHeYs=
1813498266Sopenharmony_ci
1913498266Sopenharmony_ci%hex[%89%00%81%05hello]hex%
2013498266Sopenharmony_ci</data>
2113498266Sopenharmony_ci# allow upgrade
2213498266Sopenharmony_ci<servercmd>
2313498266Sopenharmony_ciupgrade
2413498266Sopenharmony_ci</servercmd>
2513498266Sopenharmony_ci</reply>
2613498266Sopenharmony_ci
2713498266Sopenharmony_ci#
2813498266Sopenharmony_ci# Client-side
2913498266Sopenharmony_ci<client>
3013498266Sopenharmony_ci# require debug for the forced CURL_ENTROPY
3113498266Sopenharmony_ci<features>
3213498266Sopenharmony_cidebug
3313498266Sopenharmony_ciws
3413498266Sopenharmony_ci</features>
3513498266Sopenharmony_ci<server>
3613498266Sopenharmony_cihttp
3713498266Sopenharmony_ci</server>
3813498266Sopenharmony_ci<name>
3913498266Sopenharmony_ciWebSockets curl_ws_recv() with closed connection
4013498266Sopenharmony_ci</name>
4113498266Sopenharmony_ci<tool>
4213498266Sopenharmony_cilib%TESTNUMBER
4313498266Sopenharmony_ci</tool>
4413498266Sopenharmony_ci<command>
4513498266Sopenharmony_ciws://%HOSTIP:%HTTPPORT/%TESTNUMBER
4613498266Sopenharmony_ci</command>
4713498266Sopenharmony_ci</client>
4813498266Sopenharmony_ci
4913498266Sopenharmony_ci#
5013498266Sopenharmony_ci# PONG with no data and the 32 bit mask
5113498266Sopenharmony_ci#
5213498266Sopenharmony_ci<verify>
5313498266Sopenharmony_ci<protocol nocheck="yes" crlf="yes">
5413498266Sopenharmony_ciGET /%TESTNUMBER HTTP/1.1
5513498266Sopenharmony_ciHost: %HOSTIP:%HTTPPORT
5613498266Sopenharmony_ciUser-Agent: websocket/2304
5713498266Sopenharmony_ciAccept: */*
5813498266Sopenharmony_ciUpgrade: websocket
5913498266Sopenharmony_ciConnection: Upgrade
6013498266Sopenharmony_ciSec-WebSocket-Version: 13
6113498266Sopenharmony_ciSec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ==
6213498266Sopenharmony_ci
6313498266Sopenharmony_ci</protocol>
6413498266Sopenharmony_ci
6513498266Sopenharmony_ci# This test used to check that "connection closed" was output, but
6613498266Sopenharmony_ci# that is flaky since the outgoing PING just before might fail already
6713498266Sopenharmony_ci# and then the test exists before the output gets to be written
6813498266Sopenharmony_ci</verify>
6913498266Sopenharmony_ci</testcase>
70