Skip to content

Commit 2a52a4b

Browse files
deps: Update http to 1.6.0, from 1.5.0
Changelog: https://pub.dev/packages/http/changelog#160 One breaking change which now omits `charset` parameter for all media types except for `text` and some `application/xml` types: https://github.com/dart-lang/http/blob/a22386e9c/pkgs/http/lib/src/request.dart#L18-L31 dart-lang/http#1798 That breaks some of our tests which expect `charset=utf-8` being present in the `Content-Type` header, so this commit includes a fix for those tests, simply removing that expectation. The default charset still remains `utf-8`: https://github.com/dart-lang/http/blob/a22386e9c/pkgs/http/lib/src/request.dart#L179
1 parent 2a09601 commit 2a52a4b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,10 @@ packages:
509509
dependency: "direct main"
510510
description:
511511
name: http
512-
sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007
512+
sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412"
513513
url: "https://pub.dev"
514514
source: hosted
515-
version: "1.5.0"
515+
version: "1.6.0"
516516
http_multi_server:
517517
dependency: transitive
518518
description:

test/api/core_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void main() {
137137
...authHeader(email: eg.selfAccount.email, apiKey: eg.selfAccount.apiKey),
138138
...kFallbackUserAgentHeader,
139139
if (expectContentType)
140-
'content-type': 'application/x-www-form-urlencoded; charset=utf-8',
140+
'content-type': 'application/x-www-form-urlencoded',
141141
})
142142
..body.equals(expectedBody);
143143
}));
@@ -213,7 +213,7 @@ void main() {
213213
...authHeader(email: eg.selfAccount.email, apiKey: eg.selfAccount.apiKey),
214214
...kFallbackUserAgentHeader,
215215
if (expectContentType)
216-
'content-type': 'application/x-www-form-urlencoded; charset=utf-8',
216+
'content-type': 'application/x-www-form-urlencoded',
217217
})
218218
..body.equals(expectedBody);
219219
}));
@@ -244,7 +244,7 @@ void main() {
244244
...authHeader(email: eg.selfAccount.email, apiKey: eg.selfAccount.apiKey),
245245
...kFallbackUserAgentHeader,
246246
if (expectContentType)
247-
'content-type': 'application/x-www-form-urlencoded; charset=utf-8',
247+
'content-type': 'application/x-www-form-urlencoded',
248248
})
249249
..body.equals(expectedBody);
250250
}));

0 commit comments

Comments
 (0)