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

Unified Diff: pkg/http/test/client_test.dart

Issue 12084052: Always treat headers as individual strings in pkg/http. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/test/client_test.dart
diff --git a/pkg/http/test/client_test.dart b/pkg/http/test/client_test.dart
index e29cef5a341bec215c0a49d446b2a143b1342561..fd056c9c4233b18b8f8571bff339d73751ebe9ad 100644
--- a/pkg/http/test/client_test.dart
+++ b/pkg/http/test/client_test.dart
@@ -25,6 +25,11 @@ void main() {
expect(client.send(request).then((response) {
expect(response.request, equals(request));
expect(response.statusCode, equals(200));
+ expect(response.headers['single'], equals('value'));
+ // dart:io internally normalizes outgoing headers so that they never have
+ // multiple headers with the same name, so there's no way to test whether
+ // we handle that case correctly.
+
return response.stream.bytesToString();
}).whenComplete(client.close), completion(parse(equals({
'method': 'POST',

Powered by Google App Engine
This is Rietveld 408576698