File tree 3 files changed +9
-5
lines changed
3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.11.3+8
2
+
3
+ * Properly specify ` Content-Transfer-Encoding ` for multipart chunks.
4
+
1
5
## 0.11.3+7
2
6
3
7
* Declare compatibility with ` http_parser ` 3.0.0.
Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ final _newlineRegExp = new RegExp(r"\r\n|\r|\n");
18
18
/// [files] .
19
19
///
20
20
/// This request automatically sets the Content-Type header to
21
- /// `multipart/form-data` and the Content-Transfer-Encoding header to `binary` .
22
- /// These values will override any values set by the user.
21
+ /// `multipart/form-data` . This value will override any value set by the user.
23
22
///
24
23
/// var uri = Uri.parse("http://pub.dartlang.org/packages/create");
25
24
/// var request = new http.MultipartRequest("POST", url);
@@ -85,7 +84,6 @@ class MultipartRequest extends BaseRequest {
85
84
// TODO(nweiz): freeze fields and files
86
85
var boundary = _boundaryString ();
87
86
headers['content-type' ] = 'multipart/form-data; boundary="$boundary "' ;
88
- headers['content-transfer-encoding' ] = 'binary' ;
89
87
super .finalize ();
90
88
91
89
var controller = new StreamController <List <int >>(sync : true );
@@ -135,7 +133,9 @@ class MultipartRequest extends BaseRequest {
135
133
var header =
136
134
'content-disposition: form-data; name="${_browserEncode (name )}"' ;
137
135
if (! isPlainAscii (value)) {
138
- header = '$header \r\n content-type: text/plain; charset=utf-8' ;
136
+ header = '$header \r\n '
137
+ 'content-type: text/plain; charset=utf-8\r\n '
138
+ 'content-transfer-encoding: binary\r\n ' ;
139
139
}
140
140
return '$header \r\n\r\n ' ;
141
141
}
Original file line number Diff line number Diff line change 1
1
name : http
2
- version : 0.11.3+7
2
+ version : 0.11.3+8
3
3
author :
" Dart Team <[email protected] >"
4
4
homepage : https://github.com/dart-lang/http
5
5
description : A composable, Future-based API for making HTTP requests.
You can’t perform that action at this time.
0 commit comments