test2301 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <testcase>
  2. <info>
  3. <keywords>
  4. WebSockets
  5. </keywords>
  6. </info>
  7. #
  8. # Server-side
  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]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 (raw 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. # Verify data after the test has been "shot"
  47. <verify>
  48. <protocol nocheck="yes" nonewline="yes">
  49. GET /%TESTNUMBER HTTP/1.1
  50. Host: %HOSTIP:%HTTPPORT
  51. User-Agent: webbie-sox/3
  52. Accept: */*
  53. Upgrade: websocket
  54. Connection: Upgrade
  55. Sec-WebSocket-Version: 13
  56. Sec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ==
  57. %hex[%8a%00]hex%
  58. </protocol>
  59. </verify>
  60. </testcase>