xref: /curl/tests/data/test2301 (revision 0aaebf62)
1<testcase>
2<info>
3<keywords>
4WebSockets
5</keywords>
6</info>
7
8#
9# Server-side
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]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 (raw 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# Verify data after the test has been "shot"
51<verify>
52<protocol nocheck="yes" nonewline="yes">
53GET /%TESTNUMBER HTTP/1.1
54Host: %HOSTIP:%HTTPPORT
55User-Agent: webbie-sox/3
56Accept: */*
57Upgrade: websocket
58Connection: Upgrade
59Sec-WebSocket-Version: 13
60Sec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ==
61
62%hex[%8a%00]hex%
63</protocol>
64</verify>
65</testcase>
66