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

Side by Side Diff: pkg/http_parser/lib/http_parser.dart

Issue 250073002: Re-apply "Add a non-dart:io WebSocket implementation to http_parser." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | « pkg/http_parser/CHANGELOG.md ('k') | pkg/http_parser/lib/src/bytes_builder.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library http_parser; 5 library http_parser;
6 6
7 import 'package:string_scanner/string_scanner.dart'; 7 import 'package:string_scanner/string_scanner.dart';
8 8
9 export 'src/media_type.dart'; 9 export 'src/media_type.dart';
10 export 'src/web_socket.dart';
10 11
11 const _WEEKDAYS = const ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; 12 const _WEEKDAYS = const ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
12 const _MONTHS = const ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", 13 const _MONTHS = const ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
13 "Sep", "Oct", "Nov", "Dec"]; 14 "Sep", "Oct", "Nov", "Dec"];
14 15
15 final _shortWeekdayRegExp = new RegExp(r"Mon|Tue|Wed|Thu|Fri|Sat|Sun"); 16 final _shortWeekdayRegExp = new RegExp(r"Mon|Tue|Wed|Thu|Fri|Sat|Sun");
16 final _longWeekdayRegExp = 17 final _longWeekdayRegExp =
17 new RegExp(r"Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday"); 18 new RegExp(r"Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday");
18 final _monthRegExp = 19 final _monthRegExp =
19 new RegExp(r"Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec"); 20 new RegExp(r"Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec");
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 DateTime _makeDateTime(int year, int month, int day, DateTime time) { 147 DateTime _makeDateTime(int year, int month, int day, DateTime time) {
147 var dateTime = new DateTime.utc( 148 var dateTime = new DateTime.utc(
148 year, month, day, time.hour, time.minute, time.second); 149 year, month, day, time.hour, time.minute, time.second);
149 150
150 // If [day] was too large, it will cause [month] to overflow. 151 // If [day] was too large, it will cause [month] to overflow.
151 if (dateTime.month != month) { 152 if (dateTime.month != month) {
152 throw new FormatException("invalid day '$day' for month '$month'."); 153 throw new FormatException("invalid day '$day' for month '$month'.");
153 } 154 }
154 return dateTime; 155 return dateTime;
155 } 156 }
OLDNEW
« no previous file with comments | « pkg/http_parser/CHANGELOG.md ('k') | pkg/http_parser/lib/src/bytes_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698