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

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: 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..e7b9442f73b78cc490e5eac57ee9cfb97c73b91f 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,11 @@ 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].
Søren Gjesse 2013/10/10 12:37:06 Maybe add a link to the HTML5 spec for this, and m
Anders Johnsen 2013/10/10 13:24:15 Added link.
*/
- 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