xref: /curl/tests/data/test2307 (revision 18f1cd7a)
1<testcase>
2<info>
3<keywords>
4WebSockets
5</keywords>
6</info>
7
8#
9# Sends a PING with overlong payload
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[%19%7f%ff%30%30%30%30%30%30%30%30%30%30%30%30]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!hyper
35</features>
36<server>
37http
38</server>
39<name>
40WebSockets, overlong PING payload
41</name>
42<tool>
43lib2302
44</tool>
45<command>
46ws://%HOSTIP:%HTTPPORT/%TESTNUMBER
47</command>
48</client>
49
50#
51# PONG with no data and the 32 bit mask
52#
53<verify>
54<protocol nocheck="yes" nonewline="yes">
55GET /%TESTNUMBER HTTP/1.1
56Host: %HOSTIP:%HTTPPORT
57User-Agent: webbie-sox/3
58Accept: */*
59Upgrade: websocket
60Connection: Upgrade
61Sec-WebSocket-Version: 13
62Sec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ==
63
64
65</protocol>
66# 56 == CURLE_RECV_ERROR
67<errorcode>
6856
69</errorcode>
70</verify>
71</testcase>
72