Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Unified Diff: runtime/bin/websocket_impl.dart

Issue 10388159: Correctly handle the case of a 126 bytes long message, in WebSocket frame encoding. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add 65535 and 65536 Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/standalone/io/web_socket_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/websocket_impl.dart
diff --git a/runtime/bin/websocket_impl.dart b/runtime/bin/websocket_impl.dart
index f4b7b4df5e1317b1fc0f4399789d5e321d43491d..df4834c38860e5dd9263e5a2fb3288ddf685308e 100644
--- a/runtime/bin/websocket_impl.dart
+++ b/runtime/bin/websocket_impl.dart
@@ -510,7 +510,7 @@ class _WebSocketConnectionBase {
int headerSize = (mask) ? 6 : 2;
if (dataLength > 65535) {
headerSize += 8;
- } else if (dataLength > 126) {
+ } else if (dataLength > 125) {
headerSize += 2;
}
List<int> header = new List<int>(headerSize);
@@ -523,7 +523,7 @@ class _WebSocketConnectionBase {
if (dataLength > 65535) {
header[index++] = 127;
lengthBytes = 8;
- } else if (dataLength > 126) {
+ } else if (dataLength > 125) {
header[index++] = 126;
lengthBytes = 2;
}
« no previous file with comments | « no previous file | tests/standalone/io/web_socket_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698