/lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-May/068493.html
https://github.com/whatwg/whatwg.org · HTML · 90 lines · 74 code · 9 blank · 7 comment · 0 complexity · 89d7b404373a7f74f914b6e40855c5ff MD5 · raw file
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//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">
- <style type="text/css">
- pre {
- white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */
- }
- </style>
- <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
- <LINK REL="Previous" HREF="068673.html">
- <LINK REL="Next" HREF="068496.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="068673.html">[whatwg] WebSocket: garbage collection
- </A></li>
- <LI>Next message: <A HREF="068496.html">[whatwg] WebSocket set-cookie
- </A></li>
- <LI> <B>Messages sorted by:</B>
- <a href="date.html#68493">[ date ]</a>
- <a href="thread.html#68493">[ thread ]</a>
- <a href="subject.html#68493">[ subject ]</a>
- <a href="author.html#68493">[ 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="068673.html">[whatwg] WebSocket: garbage collection
- </A></li>
- <LI>Next message: <A HREF="068496.html">[whatwg] WebSocket set-cookie
- </A></li>
- <LI> <B>Messages sorted by:</B>
- <a href="date.html#68493">[ date ]</a>
- <a href="thread.html#68493">[ thread ]</a>
- <a href="subject.html#68493">[ subject ]</a>
- <a href="author.html#68493">[ 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>