test2302 1.1 KB

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