/lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-May/026220.html
https://github.com/whatwg/whatwg.org · HTML · 96 lines · 69 code · 20 blank · 7 comment · 0 complexity · 05ee1fc757fa9cfd0132e459a68bf4c1 MD5 · raw file
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
- <HTML>
- <HEAD>
- <TITLE> [whatwg] WebSocket handshake: 0x0D in first "line"
- </TITLE>
- <LINK REL="Index" HREF="index.html" >
- <LINK REL="made" HREF="mailto:whatwg%40lists.whatwg.org?Subject=Re%3A%20%5Bwhatwg%5D%20WebSocket%20handshake%3A%200x0D%20in%20first%20%22line%22&In-Reply-To=%3Cop.vcbxqq16idj3kv%40simon-pieterss-macbook.local%3E">
- <META NAME="robots" CONTENT="index,nofollow">
- <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
- <LINK REL="Previous" HREF="026400.html">
- <LINK REL="Next" HREF="026221.html">
- </HEAD>
- <BODY BGCOLOR="#ffffff">
- <H1>[whatwg] WebSocket handshake: 0x0D in first "line"</H1>
- <!--htdig_noindex-->
- <B>Simon Pieters</B>
- <A HREF="mailto:whatwg%40lists.whatwg.org?Subject=Re%3A%20%5Bwhatwg%5D%20WebSocket%20handshake%3A%200x0D%20in%20first%20%22line%22&In-Reply-To=%3Cop.vcbxqq16idj3kv%40simon-pieterss-macbook.local%3E"
- TITLE="[whatwg] WebSocket handshake: 0x0D in first "line"">simonp at opera.com
- </A><BR>
- <I>Fri May 7 02:53:04 PDT 2010</I>
- <P><UL>
- <LI>Previous message: <A HREF="026400.html">[whatwg] WebSocket: garbage collection
- </A></li>
- <LI>Next message: <A HREF="026221.html">[whatwg] RFC: <input type="username">
- </A></li>
- <LI> <B>Messages sorted by:</B>
- <a href="date.html#26220">[ date ]</a>
- <a href="thread.html#26220">[ thread ]</a>
- <a href="subject.html#26220">[ subject ]</a>
- <a href="author.html#26220">[ author ]</a>
- </LI>
- </UL>
- <HR>
- <!--/htdig_noindex-->
- <!--beginarticle-->
- <PRE>establish a WebSocket connection
- [[
- 28. Read bytes from the server until either the connection closes, or a
- 0x0A byte is read. Let field be these bytes, including the 0x0A byte.
- If field is not at least seven bytes long, or if the last two bytes aren't
- 0x0D and 0x0A respectively, or if it does not contain at least two 0x20
- bytes, then fail the WebSocket connection and abort these steps.
- User agents may apply a timeout to this step, failing the WebSocket
- connection if the server does not send back data in a suitable time period.
- 29. Let code be the substring of field that starts from the byte after the
- first 0x20 byte, and ends with the byte before the second 0x20 byte.
- ]]
- This makes it possible for servers to include 0x0D bytes before and after
- the status code, and potentially trick broken clients that aren't so fuzzy
- with new lines to misinterpret the handshake. Maybe we should read ahead
- to the first 0x0D byte and check if the next byte is 0x0A instead.
- --
- Simon Pieters
- Opera Software
- </PRE>
- <!--endarticle-->
- <!--htdig_noindex-->
- <HR>
- <P><UL>
- <!--threads-->
- <LI>Previous message: <A HREF="026400.html">[whatwg] WebSocket: garbage collection
- </A></li>
- <LI>Next message: <A HREF="026221.html">[whatwg] RFC: <input type="username">
- </A></li>
- <LI> <B>Messages sorted by:</B>
- <a href="date.html#26220">[ date ]</a>
- <a href="thread.html#26220">[ thread ]</a>
- <a href="subject.html#26220">[ subject ]</a>
- <a href="author.html#26220">[ author ]</a>
- </LI>
- </UL>
- <hr>
- <a href="http://lists.whatwg.org/listinfo.cgi/whatwg-whatwg.org">More information about the whatwg
- mailing list</a><br>
- <!--/htdig_noindex-->
- </body></html>