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

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

Issue 198423002: Content-Type header is now stored with a case insensitive key. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
« no previous file with comments | « pkg/http/lib/src/base_request.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/test/request_test.dart
diff --git a/pkg/http/test/request_test.dart b/pkg/http/test/request_test.dart
index 929cc636f0299d05e1720ce396447165da1951ae..31c7e91803527fc276c68da168e5f6eca8fc3cc2 100644
--- a/pkg/http/test/request_test.dart
+++ b/pkg/http/test/request_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -271,6 +271,14 @@ void main() {
expect(request.headers[HttpHeaders.CONTENT_TYPE], isNull);
});
+ test('name is case insensitive', () {
+ var request = new http.Request('POST', dummyUrl);
+ request.headers[HttpHeaders.CONTENT_TYPE.toUpperCase()] =
+ 'application/json';
+ expect(request.headers[HttpHeaders.CONTENT_TYPE.toLowerCase()],
+ equals('application/json'));
+ });
+
test('is set to application/x-www-form-urlencoded with charset utf-8 if '
'bodyFields is set', () {
var request = new http.Request('POST', dummyUrl);
« no previous file with comments | « pkg/http/lib/src/base_request.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698