xref: /curl/tests/data/test2302 (revision 0aaebf62)
1<testcase>
2<info>
3<keywords>
4WebSockets
5</keywords>
6</info>
7
8#
9# Sends a PING + a 5 byte hello TEXT
10<reply>
11<data nocheck="yes" nonewline="yes">
12HTTP/1.1 101 Switching to WebSockets
13Server: test-server/fake
14Upgrade: websocket
15Connection: Upgrade
16Something: else
17Sec-WebSocket-Accept: HkPsVga7+8LuxM4RGQ5p9tZHeYs=
18
19%hex[%89%00%81%05hello]hex%
20</data>
21# allow upgrade
22<servercmd>
23upgrade
24</servercmd>
25</reply>
26
27#
28# Client-side
29<client>
30# require debug for the forced CURL_ENTROPY
31<features>
32debug
33ws
34</features>
35<server>
36http
37</server>
38<name>
39WebSockets via callback (frame mode) + curl_ws_send()
40</name>
41<tool>
42lib%TESTNUMBER
43</tool>
44<command>
45ws://%HOSTIP:%HTTPPORT/%TESTNUMBER
46</command>
47</client>
48
49#
50# PONG with no data and the 32 bit mask
51#
52<verify>
53<protocol nocheck="yes" nonewline="yes">
54GET /%TESTNUMBER HTTP/1.1
55Host: %HOSTIP:%HTTPPORT
56User-Agent: webbie-sox/3
57Accept: */*
58Upgrade: websocket
59Connection: Upgrade
60Sec-WebSocket-Version: 13
61Sec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ==
62
63%hex[%8a%808321]hex%
64</protocol>
65<stdout mode="text">
6668 65 6c 6c 6f
67RECFLAGS: 1
68</stdout>
69</verify>
70</testcase>
71