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

Side by Side Diff: runtime/bin/http_parser.dart

Issue 10441021: Implement a MIME multipart parser (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/io_sources.gypi » ('j') | runtime/bin/mime_multipart_parser.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Global constants. 5 // Global constants.
6 class _Const { 6 class _Const {
7 // Bytes for "HTTP". 7 // Bytes for "HTTP".
8 static final HTTP = const [72, 84, 84, 80]; 8 static final HTTP = const [72, 84, 84, 80];
9 // Bytes for "HTTP/1.". 9 // Bytes for "HTTP/1.".
10 static final HTTP1DOT = const [72, 84, 84, 80, 47, 49, 46]; 10 static final HTTP1DOT = const [72, 84, 84, 80, 47, 49, 46];
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 27
28 28
29 // Frequently used character codes. 29 // Frequently used character codes.
30 class _CharCode { 30 class _CharCode {
31 static final int HT = 9; 31 static final int HT = 9;
32 static final int LF = 10; 32 static final int LF = 10;
33 static final int CR = 13; 33 static final int CR = 13;
34 static final int SP = 32; 34 static final int SP = 32;
35 static final int COMMA = 44; 35 static final int COMMA = 44;
36 static final int DASH = 45;
36 static final int SLASH = 47; 37 static final int SLASH = 47;
37 static final int ZERO = 48; 38 static final int ZERO = 48;
38 static final int ONE = 49; 39 static final int ONE = 49;
39 static final int COLON = 58; 40 static final int COLON = 58;
40 static final int SEMI_COLON = 59; 41 static final int SEMI_COLON = 59;
41 } 42 }
42 43
43 44
44 // States of the HTTP parser state machine. 45 // States of the HTTP parser state machine.
45 class _State { 46 class _State {
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 Function dataEnd; 710 Function dataEnd;
710 Function error; 711 Function error;
711 } 712 }
712 713
713 714
714 class HttpParserException implements Exception { 715 class HttpParserException implements Exception {
715 const HttpParserException([String this.message = ""]); 716 const HttpParserException([String this.message = ""]);
716 String toString() => "HttpParserException: $message"; 717 String toString() => "HttpParserException: $message";
717 final String message; 718 final String message;
718 } 719 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/io_sources.gypi » ('j') | runtime/bin/mime_multipart_parser.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698