Chromium Code Reviews| 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]. | |
|
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.
| |
| 70 */ | 73 */ |
| 71 static HttpMultipartFormData parse(MimeMultipart multipart) | 74 static HttpMultipartFormData parse(MimeMultipart multipart, |
| 72 => _HttpMultipartFormData.parse(multipart); | 75 {Encoding defaultEncoding: UTF8}) |
| 76 => _HttpMultipartFormData.parse(multipart, defaultEncoding); | |
| 73 } | 77 } |
| OLD | NEW |