From: Rodrigo Kumpera Date: Fri, 13 Dec 2013 15:24:06 +0000 (-0800) Subject: Merge pull request #832 from xplicit/webperf1 X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=7ea732a51cdd7edbd5488c630245d594142aa1b7;hp=f6e4c12036e62d52df6884721d9c8f76dcd95bfe;p=mono.git Merge pull request #832 from xplicit/webperf1 Header names should be compared binary but not linguistic. --- diff --git a/mcs/class/System.Web/System.Web/HttpHeaderCollection.cs b/mcs/class/System.Web/System.Web/HttpHeaderCollection.cs index 6bc6917339b..b015d16ef6e 100644 --- a/mcs/class/System.Web/System.Web/HttpHeaderCollection.cs +++ b/mcs/class/System.Web/System.Web/HttpHeaderCollection.cs @@ -34,6 +34,10 @@ namespace System.Web { bool? headerCheckingEnabled; + public HttpHeaderCollection () : base (StringComparer.OrdinalIgnoreCase) + { + } + bool HeaderCheckingEnabled { get { if (headerCheckingEnabled == null) diff --git a/mcs/class/System.Web/System.Web/HttpResponse.cs b/mcs/class/System.Web/System.Web/HttpResponse.cs index ac432ab3da3..053d20c9c58 100644 --- a/mcs/class/System.Web/System.Web/HttpResponse.cs +++ b/mcs/class/System.Web/System.Web/HttpResponse.cs @@ -510,27 +510,27 @@ namespace System.Web if (headers_sent) throw new HttpException ("Headers have been already sent"); #if !TARGET_J2EE - if (String.Compare (name, "content-length", true, Helpers.InvariantCulture) == 0){ + if (String.Compare (name, "content-length", StringComparison.OrdinalIgnoreCase) == 0){ content_length = (long) UInt64.Parse (value); use_chunked = false; return; } #endif - if (String.Compare (name, "content-type", true, Helpers.InvariantCulture) == 0){ + if (String.Compare (name, "content-type", StringComparison.OrdinalIgnoreCase) == 0){ ContentType = value; return; } #if !TARGET_J2EE - if (String.Compare (name, "transfer-encoding", true, Helpers.InvariantCulture) == 0){ + if (String.Compare (name, "transfer-encoding", StringComparison.OrdinalIgnoreCase) == 0){ transfer_encoding = value; use_chunked = false; return; } #endif - if (String.Compare (name, "cache-control", true, Helpers.InvariantCulture) == 0){ + if (String.Compare (name, "cache-control", StringComparison.OrdinalIgnoreCase) == 0){ user_cache_control = value; return; }