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

Unified Diff: pkg/http/lib/src/base_request.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 | « AUTHORS ('k') | pkg/http/test/request_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/lib/src/base_request.dart
diff --git a/pkg/http/lib/src/base_request.dart b/pkg/http/lib/src/base_request.dart
index f54e757f0a6a6531afbccf2c5c10b72c5a0f53e2..7e5347b19f35317f86556baa5ea3a123d7323779 100644
--- a/pkg/http/lib/src/base_request.dart
+++ b/pkg/http/lib/src/base_request.dart
@@ -1,10 +1,11 @@
-// Copyright (c) 2012, 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.
library base_request;
import 'dart:async';
+import 'dart:collection';
import 'byte_stream.dart';
import 'client.dart';
@@ -79,7 +80,9 @@ abstract class BaseRequest {
/// Creates a new HTTP request.
BaseRequest(this.method, this.url)
- : headers = <String, String>{};
+ : headers = new LinkedHashMap<String, String>(
+ equals: (key1, key2) => key1.toLowerCase() == key2.toLowerCase(),
+ hashCode: (key) => key.toLowerCase().hashCode);
/// Finalizes the HTTP request in preparation for it being sent. This freezes
/// all mutable fields and returns a single-subscription [ByteStream] that
« no previous file with comments | « AUTHORS ('k') | pkg/http/test/request_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698