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

Side by Side Diff: sdk/lib/io/http_parser.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/http_headers.dart ('k') | sdk/lib/io/http_utils.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 // Global constants. 7 // Global constants.
8 class _Const { 8 class _Const {
9 // Bytes for "HTTP". 9 // Bytes for "HTTP".
10 static const HTTP = const [72, 84, 84, 80]; 10 static const HTTP = const [72, 84, 84, 80];
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 } else if (headerValue[index] == " " || headerValue[index] == "\t") { 833 } else if (headerValue[index] == " " || headerValue[index] == "\t") {
834 start++; 834 start++;
835 } 835 }
836 index++; 836 index++;
837 } 837 }
838 tokens.add(headerValue.substring(start, index)); 838 tokens.add(headerValue.substring(start, index));
839 return tokens; 839 return tokens;
840 } 840 }
841 841
842 int _toLowerCase(int byte) { 842 int _toLowerCase(int byte) {
843 final int aCode = "A".charCodeAt(0); 843 final int aCode = "A".codeUnitAt(0);
844 final int zCode = "Z".charCodeAt(0); 844 final int zCode = "Z".codeUnitAt(0);
845 final int delta = "a".charCodeAt(0) - aCode; 845 final int delta = "a".codeUnitAt(0) - aCode;
846 return (aCode <= byte && byte <= zCode) ? byte + delta : byte; 846 return (aCode <= byte && byte <= zCode) ? byte + delta : byte;
847 } 847 }
848 848
849 int _expect(int val1, int val2) { 849 int _expect(int val1, int val2) {
850 if (val1 != val2) { 850 if (val1 != val2) {
851 throw new HttpParserException("Failed to parse HTTP"); 851 throw new HttpParserException("Failed to parse HTTP");
852 } 852 }
853 } 853 }
854 854
855 int _expectHexDigit(int byte) { 855 int _expectHexDigit(int byte) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 StreamController<_HttpIncoming> _controller; 956 StreamController<_HttpIncoming> _controller;
957 StreamController<List<int>> _bodyController; 957 StreamController<List<int>> _bodyController;
958 } 958 }
959 959
960 960
961 class HttpParserException implements Exception { 961 class HttpParserException implements Exception {
962 const HttpParserException([String this.message = ""]); 962 const HttpParserException([String this.message = ""]);
963 String toString() => "HttpParserException: $message"; 963 String toString() => "HttpParserException: $message";
964 final String message; 964 final String message;
965 } 965 }
OLDNEW
« no previous file with comments | « sdk/lib/io/http_headers.dart ('k') | sdk/lib/io/http_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698