1*6236dae4SAndroid Build Coastguard Worker<testcase> 2*6236dae4SAndroid Build Coastguard Worker<info> 3*6236dae4SAndroid Build Coastguard Worker<keywords> 4*6236dae4SAndroid Build Coastguard WorkerWebSockets 5*6236dae4SAndroid Build Coastguard Worker</keywords> 6*6236dae4SAndroid Build Coastguard Worker</info> 7*6236dae4SAndroid Build Coastguard Worker 8*6236dae4SAndroid Build Coastguard Worker# 9*6236dae4SAndroid Build Coastguard Worker# Sends a PING + a 5 byte hello TEXT 10*6236dae4SAndroid Build Coastguard Worker<reply> 11*6236dae4SAndroid Build Coastguard Worker<data nocheck="yes" nonewline="yes"> 12*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 101 Switching to WebSockets swsclose 13*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake 14*6236dae4SAndroid Build Coastguard WorkerUpgrade: websocket 15*6236dae4SAndroid Build Coastguard WorkerConnection: Upgrade 16*6236dae4SAndroid Build Coastguard WorkerSomething: else 17*6236dae4SAndroid Build Coastguard WorkerSec-WebSocket-Accept: HkPsVga7+8LuxM4RGQ5p9tZHeYs= 18*6236dae4SAndroid Build Coastguard Worker 19*6236dae4SAndroid Build Coastguard Worker%hex[%89%00%81%05hello]hex% 20*6236dae4SAndroid Build Coastguard Worker</data> 21*6236dae4SAndroid Build Coastguard Worker# allow upgrade 22*6236dae4SAndroid Build Coastguard Worker<servercmd> 23*6236dae4SAndroid Build Coastguard Workerupgrade 24*6236dae4SAndroid Build Coastguard Worker</servercmd> 25*6236dae4SAndroid Build Coastguard Worker</reply> 26*6236dae4SAndroid Build Coastguard Worker 27*6236dae4SAndroid Build Coastguard Worker# 28*6236dae4SAndroid Build Coastguard Worker# Client-side 29*6236dae4SAndroid Build Coastguard Worker<client> 30*6236dae4SAndroid Build Coastguard Worker# require debug for the forced CURL_ENTROPY 31*6236dae4SAndroid Build Coastguard Worker<features> 32*6236dae4SAndroid Build Coastguard WorkerDebug 33*6236dae4SAndroid Build Coastguard Workerws 34*6236dae4SAndroid Build Coastguard Worker</features> 35*6236dae4SAndroid Build Coastguard Worker<server> 36*6236dae4SAndroid Build Coastguard Workerhttp 37*6236dae4SAndroid Build Coastguard Worker</server> 38*6236dae4SAndroid Build Coastguard Worker<name> 39*6236dae4SAndroid Build Coastguard WorkerWebSockets curl_ws_recv() with closed connection 40*6236dae4SAndroid Build Coastguard Worker</name> 41*6236dae4SAndroid Build Coastguard Worker<tool> 42*6236dae4SAndroid Build Coastguard Workerlib%TESTNUMBER 43*6236dae4SAndroid Build Coastguard Worker</tool> 44*6236dae4SAndroid Build Coastguard Worker<command> 45*6236dae4SAndroid Build Coastguard Workerws://%HOSTIP:%HTTPPORT/%TESTNUMBER 46*6236dae4SAndroid Build Coastguard Worker</command> 47*6236dae4SAndroid Build Coastguard Worker</client> 48*6236dae4SAndroid Build Coastguard Worker 49*6236dae4SAndroid Build Coastguard Worker# 50*6236dae4SAndroid Build Coastguard Worker# PONG with no data and the 32 bit mask 51*6236dae4SAndroid Build Coastguard Worker# 52*6236dae4SAndroid Build Coastguard Worker<verify> 53*6236dae4SAndroid Build Coastguard Worker<protocol nocheck="yes" crlf="yes"> 54*6236dae4SAndroid Build Coastguard WorkerGET /%TESTNUMBER HTTP/1.1 55*6236dae4SAndroid Build Coastguard WorkerHost: %HOSTIP:%HTTPPORT 56*6236dae4SAndroid Build Coastguard WorkerUser-Agent: websocket/2304 57*6236dae4SAndroid Build Coastguard WorkerAccept: */* 58*6236dae4SAndroid Build Coastguard WorkerUpgrade: websocket 59*6236dae4SAndroid Build Coastguard WorkerConnection: Upgrade 60*6236dae4SAndroid Build Coastguard WorkerSec-WebSocket-Version: 13 61*6236dae4SAndroid Build Coastguard WorkerSec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ== 62*6236dae4SAndroid Build Coastguard Worker 63*6236dae4SAndroid Build Coastguard Worker</protocol> 64*6236dae4SAndroid Build Coastguard Worker 65*6236dae4SAndroid Build Coastguard Worker# This test used to check that "connection closed" was output, but 66*6236dae4SAndroid Build Coastguard Worker# that is flaky since the outgoing PING just before might fail already 67*6236dae4SAndroid Build Coastguard Worker# and then the test exists before the output gets to be written 68*6236dae4SAndroid Build Coastguard Worker</verify> 69*6236dae4SAndroid Build Coastguard Worker</testcase> 70