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

Unified Diff: sdk/lib/io/websocket_impl.dart

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 7 years, 10 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 | « sdk/lib/io/string_transformer.dart ('k') | sdk/lib/json/json_base.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/websocket_impl.dart
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart
index a8d01c20d8914c8453ad6e11512ab598de0f46fd..a77ebfa730f3874c19dd06196e38d6925b19e4e1 100644
--- a/sdk/lib/io/websocket_impl.dart
+++ b/sdk/lib/io/websocket_impl.dart
@@ -381,7 +381,7 @@ class _WebSocketTransformerImpl implements WebSocketTransformer {
response.headers.add(HttpHeaders.UPGRADE, "websocket");
String key = request.headers.value("Sec-WebSocket-Key");
SHA1 sha1 = new SHA1();
- sha1.add("$key$_webSocketGUID".charCodes);
+ sha1.add("$key$_webSocketGUID".codeUnits);
String accept = _Base64._encode(sha1.close());
response.headers.add("Sec-WebSocket-Accept", accept);
response.headers.contentLength = 0;
@@ -490,7 +490,7 @@ class _WebSocketImpl extends Stream<Event> implements WebSocket {
error("Response did not contain a 'Sec-WebSocket-Accept' header");
}
SHA1 sha1 = new SHA1();
- sha1.add("$nonce$_webSocketGUID".charCodes);
+ sha1.add("$nonce$_webSocketGUID".codeUnits);
List<int> expectedAccept = sha1.close();
List<int> receivedAccept = _Base64._decode(accept);
if (expectedAccept.length != receivedAccept.length) {
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | sdk/lib/json/json_base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698