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

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

Issue 26685004: Expand usage of defaultEncoding in HttpBody in the http_server package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add link and generate docs for http_server. Created 7 years, 2 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
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 /** 8 /**
9 * [:HttpMultipartFormData:] class used for 'upgrading' a [MimeMultipart] by 9 * [:HttpMultipartFormData:] class used for 'upgrading' a [MimeMultipart] by
10 * parsing it as a 'multipart/form-data' part. The following code shows how 10 * parsing it as a 'multipart/form-data' part. The following code shows how
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 * 60 *
61 * Use this method to index other headers available in the original 61 * Use this method to index other headers available in the original
62 * [MimeMultipart]. 62 * [MimeMultipart].
63 */ 63 */
64 String value(String name); 64 String value(String name);
65 65
66 /** 66 /**
67 * Parse a [MimeMultipart] and return a [HttpMultipartFormData]. If the 67 * Parse a [MimeMultipart] and return a [HttpMultipartFormData]. If the
68 * [:Content-Disposition:] header is missing or invalid, a [HttpException] is 68 * [:Content-Disposition:] header is missing or invalid, a [HttpException] is
69 * thrown. 69 * thrown.
70 *
71 * If the [MimeMultipart] is identified as text, and the [:Content-Type:]
72 * header is missing, the data is decoded using [defaultEncoding]. See more
73 * information in the
74 * [HTML5 spec](http://dev.w3.org/html5/spec-preview/
75 * constraints.html#multipart-form-data).
70 */ 76 */
71 static HttpMultipartFormData parse(MimeMultipart multipart) 77 static HttpMultipartFormData parse(MimeMultipart multipart,
72 => _HttpMultipartFormData.parse(multipart); 78 {Encoding defaultEncoding: UTF8})
79 => _HttpMultipartFormData.parse(multipart, defaultEncoding);
73 } 80 }
OLDNEW
« no previous file with comments | « pkg/http_server/lib/src/http_body_impl.dart ('k') | pkg/http_server/lib/src/http_multipart_form_data_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698