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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: pkg/http_server/lib/src/http_multipart_form_data.dart
diff --git a/pkg/http_server/lib/src/http_multipart_form_data.dart b/pkg/http_server/lib/src/http_multipart_form_data.dart
index 86b4604acc0c70254762b76e01025352dbc736cc..eae575bda177dd67b3eb827cdea03f134c1fbba3 100644
--- a/pkg/http_server/lib/src/http_multipart_form_data.dart
+++ b/pkg/http_server/lib/src/http_multipart_form_data.dart
@@ -67,7 +67,14 @@ abstract class HttpMultipartFormData implements Stream {
* Parse a [MimeMultipart] and return a [HttpMultipartFormData]. If the
* [:Content-Disposition:] header is missing or invalid, a [HttpException] is
* thrown.
+ *
+ * If the [MimeMultipart] is identified as text, and the [:Content-Type:]
+ * header is missing, the data is decoded using [defaultEncoding]. See more
+ * information in the
+ * [HTML5 spec](http://dev.w3.org/html5/spec-preview/
+ * constraints.html#multipart-form-data).
*/
- static HttpMultipartFormData parse(MimeMultipart multipart)
- => _HttpMultipartFormData.parse(multipart);
+ static HttpMultipartFormData parse(MimeMultipart multipart,
+ {Encoding defaultEncoding: UTF8})
+ => _HttpMultipartFormData.parse(multipart, defaultEncoding);
}
« 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