| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |