/lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-April/026005.html

https://github.com/whatwg/whatwg.org · HTML · 117 lines · 70 code · 40 blank · 7 comment · 0 complexity · 65e4208f92c01c0c71568ec2c5cca113 MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  2. <HTML>
  3. <HEAD>
  4. <TITLE> [whatwg] WebSocket opening handshake, when to bail out
  5. </TITLE>
  6. <LINK REL="Index" HREF="index.html" >
  7. <LINK REL="made" HREF="mailto:whatwg%40lists.whatwg.org?Subject=Re%3A%20%5Bwhatwg%5D%20WebSocket%20opening%20handshake%2C%20when%20to%20bail%20out&In-Reply-To=%3Cop.vbl3r0vridj3kv%40simon-pieterss-macbook.local%3E">
  8. <META NAME="robots" CONTENT="index,nofollow">
  9. <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
  10. <LINK REL="Previous" HREF="026009.html">
  11. <LINK REL="Next" HREF="026007.html">
  12. </HEAD>
  13. <BODY BGCOLOR="#ffffff">
  14. <H1>[whatwg] WebSocket opening handshake, when to bail out</H1>
  15. <!--htdig_noindex-->
  16. <B>Simon Pieters</B>
  17. <A HREF="mailto:whatwg%40lists.whatwg.org?Subject=Re%3A%20%5Bwhatwg%5D%20WebSocket%20opening%20handshake%2C%20when%20to%20bail%20out&In-Reply-To=%3Cop.vbl3r0vridj3kv%40simon-pieterss-macbook.local%3E"
  18. TITLE="[whatwg] WebSocket opening handshake, when to bail out">simonp at opera.com
  19. </A><BR>
  20. <I>Fri Apr 23 04:05:50 PDT 2010</I>
  21. <P><UL>
  22. <LI>Previous message: <A HREF="026009.html">[whatwg] Canvas 2D Context Proposal: resetOriginClean
  23. </A></li>
  24. <LI>Next message: <A HREF="026007.html">[whatwg] Introduction of media accessibility features
  25. </A></li>
  26. <LI> <B>Messages sorted by:</B>
  27. <a href="date.html#26005">[ date ]</a>
  28. <a href="thread.html#26005">[ thread ]</a>
  29. <a href="subject.html#26005">[ subject ]</a>
  30. <a href="author.html#26005">[ author ]</a>
  31. </LI>
  32. </UL>
  33. <HR>
  34. <!--/htdig_noindex-->
  35. <!--beginarticle-->
  36. <PRE>The establish a WebSocket connection algorithm is very specific about when
  37. to bail out. This is annoying. It means we have to reimplement header
  38. parsing just for WebSockets, when we already have very well tested header
  39. parsing in place. We'd like to be able to bail out or wait for more data
  40. as we see fit for the opening handshake. It does not seem to be
  41. interop-sensitive whether one browser bails out a few bytes earlier than
  42. another browser for an invalid handshake. The difference is only
  43. observable in carefully crafted cases where the server sleeps half-way
  44. through the handshake.
  45. For instance, the algorithm says to wait for an 0x0A byte and only then
  46. check the status code. We want to check the status code earlier,
  47. byte-for-byte.
  48. For the fields, the algorithm says to do some processing while parsing
  49. each field, and then do further processing when they're all received. We'd
  50. like to wait with processing them until we have them all.
  51. (This feedback makes the earlier feedback about moving processing of
  52. fields with empty name moot.)
  53. --
  54. Simon Pieters
  55. Opera Software
  56. </PRE>
  57. <!--endarticle-->
  58. <!--htdig_noindex-->
  59. <HR>
  60. <P><UL>
  61. <!--threads-->
  62. <LI>Previous message: <A HREF="026009.html">[whatwg] Canvas 2D Context Proposal: resetOriginClean
  63. </A></li>
  64. <LI>Next message: <A HREF="026007.html">[whatwg] Introduction of media accessibility features
  65. </A></li>
  66. <LI> <B>Messages sorted by:</B>
  67. <a href="date.html#26005">[ date ]</a>
  68. <a href="thread.html#26005">[ thread ]</a>
  69. <a href="subject.html#26005">[ subject ]</a>
  70. <a href="author.html#26005">[ author ]</a>
  71. </LI>
  72. </UL>
  73. <hr>
  74. <a href="http://lists.whatwg.org/listinfo.cgi/whatwg-whatwg.org">More information about the whatwg
  75. mailing list</a><br>
  76. <!--/htdig_noindex-->
  77. </body></html>