xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | WebSockets |
| 5 | </keywords> |
| 6 | </info> |
| 7 | |
| 8 | # |
| 9 | <reply> |
| 10 | <data nocheck="yes" nonewline="yes"> |
| 11 | HTTP/1.1 200 Oblivious
|
| 12 | Server: test-server/fake
|
| 13 | Something: else
|
| 14 | Content-Length: 6
|
| 15 |
|
| 16 | hello |
| 17 | </data> |
| 18 | </reply> |
| 19 | |
| 20 | # |
| 21 | # Client-side |
| 22 | <client> |
| 23 | # require debug for the forced CURL_ENTROPY |
| 24 | <features> |
| 25 | debug |
| 26 | ws |
| 27 | </features> |
| 28 | <server> |
| 29 | http |
| 30 | </server> |
| 31 | <name> |
| 32 | WebSockets but gets a 200 back |
| 33 | </name> |
| 34 | <tool> |
| 35 | lib2302 |
| 36 | </tool> |
| 37 | <command> |
| 38 | ws://%HOSTIP:%HTTPPORT/%TESTNUMBER |
| 39 | </command> |
| 40 | </client> |
| 41 | |
| 42 | <verify> |
| 43 | <protocol> |
| 44 | GET /%TESTNUMBER HTTP/1.1
|
| 45 | Host: %HOSTIP:%HTTPPORT
|
| 46 | User-Agent: webbie-sox/3
|
| 47 | Accept: */*
|
| 48 | Upgrade: websocket
|
| 49 | Connection: Upgrade
|
| 50 | Sec-WebSocket-Version: 13
|
| 51 | Sec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ==
|
| 52 |
|
| 53 | </protocol> |
| 54 | # 22 == CURLE_HTTP_RETURNED_ERROR |
| 55 | <errorcode> |
| 56 | 22 |
| 57 | </errorcode> |
| 58 | </verify> |
| 59 | </testcase> |