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

Side by Side Diff: pkg/http_server/lib/src/http_multipart_form_data_impl.dart

Issue 19158002: Fix editor warnings in http_server and mime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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_server/lib/src/http_body.dart ('k') | pkg/mime/lib/src/extension_map.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) 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 part of http_server; 5 part of http_server;
6 6
7 7
8 class _HttpMultipartFormData extends Stream implements HttpMultipartFormData { 8 class _HttpMultipartFormData extends Stream implements HttpMultipartFormData {
9 final ContentType contentType; 9 final ContentType contentType;
10 final HeaderValue contentDisposition; 10 final HeaderValue contentDisposition;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 bool get isText => _isText; 54 bool get isText => _isText;
55 bool get isBinary => !_isText; 55 bool get isBinary => !_isText;
56 56
57 static HttpMultipartFormData parse(MimeMultipart multipart) { 57 static HttpMultipartFormData parse(MimeMultipart multipart) {
58 var type; 58 var type;
59 var encoding; 59 var encoding;
60 var disposition; 60 var disposition;
61 var remaining = new Map<String, String>(); 61 var remaining = new Map<String, String>();
62 for (String key in multipart.headers.keys) { 62 for (String key in multipart.headers.keys) {
63 switch (key) { 63 switch (key) {
64 case HttpHeaders.CONTENT_TYPE: 64 case 'content-type':
65 type = ContentType.parse(multipart.headers[key]); 65 type = ContentType.parse(multipart.headers[key]);
66 break; 66 break;
67 67
68 case 'content-transfer-encoding': 68 case 'content-transfer-encoding':
69 encoding = HeaderValue.parse(multipart.headers[key]); 69 encoding = HeaderValue.parse(multipart.headers[key]);
70 break; 70 break;
71 71
72 case 'content-disposition': 72 case 'content-disposition':
73 disposition = HeaderValue.parse(multipart.headers[key]); 73 disposition = HeaderValue.parse(multipart.headers[key]);
74 break; 74 break;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 while ((amp = input.indexOf('&', offset)) >= 0) { 129 while ((amp = input.indexOf('&', offset)) >= 0) {
130 buffer.write(input.substring(offset, amp)); 130 buffer.write(input.substring(offset, amp));
131 int end = input.indexOf(';', amp); 131 int end = input.indexOf(';', amp);
132 parse(amp, end); 132 parse(amp, end);
133 offset = end + 1; 133 offset = end + 1;
134 } 134 }
135 buffer.write(input.substring(offset)); 135 buffer.write(input.substring(offset));
136 return buffer.toString(); 136 return buffer.toString();
137 } 137 }
138 } 138 }
OLDNEW
« no previous file with comments | « pkg/http_server/lib/src/http_body.dart ('k') | pkg/mime/lib/src/extension_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698