Author: mhabersack
Date: 2007-09-28 03:42:31 -0400 (Fri, 28 Sep 2007)
New Revision: 86552

Modified:
   trunk/mcs/class/System/System.Net/ChangeLog
   trunk/mcs/class/System/System.Net/HttpListenerRequest.cs
Log:
2007-09-28  Marek Habersack  <[EMAIL PROTECTED]>

        * HttpListenerRequest.cs: make sure 'method' is always stored in
        upper case.
        The DELETE method must not error out on missing Content-Length
        header (this is the behavior of the MS.NET version of the
        class). Fixes bug #323215.


Modified: trunk/mcs/class/System/System.Net/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Net/ChangeLog 2007-09-28 07:35:13 UTC (rev 
86551)
+++ trunk/mcs/class/System/System.Net/ChangeLog 2007-09-28 07:42:31 UTC (rev 
86552)
@@ -1,3 +1,11 @@
+2007-09-28  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * HttpListenerRequest.cs: make sure 'method' is always stored in
+       upper case.
+       The DELETE method must not error out on missing Content-Length
+       header (this is the behavior of the MS.NET version of the
+       class). Fixes bug #323215.
+
 2007-08-29  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
        * IPAddress.cs, IPv6Address.cs : (ToString) output ScopeId.

Modified: trunk/mcs/class/System/System.Net/HttpListenerRequest.cs
===================================================================
--- trunk/mcs/class/System/System.Net/HttpListenerRequest.cs    2007-09-28 
07:35:13 UTC (rev 86551)
+++ trunk/mcs/class/System/System.Net/HttpListenerRequest.cs    2007-09-28 
07:42:31 UTC (rev 86552)
@@ -80,12 +80,11 @@
                                return;
                        }
 
-                       method = parts [0];
+                       method = parts [0].ToUpperInvariant ();
                        foreach (char c in method){
                                int ic = (int) c;
 
                                if ((ic >= 'A' && ic <= 'Z') ||
-                                   (ic >= 'a' && ic <= 'z') ||
                                    (ic > 32 && c < 127 && c != '(' && c != ')' 
&& c != '<' &&
                                     c != '<' && c != '>' && c != '@' && c != 
',' && c != ';' &&
                                     c != ':' && c != '\\' && c != '"' && c != 
'/' && c != '[' &&
@@ -173,7 +172,7 @@
 
                        CreateQueryString (url.Query);
 
-                       if (method == "GET" || method == "HEAD")
+                       if (method == "GET" || method == "HEAD" || method == 
"DELETE")
                                return;
 
                        string t_encoding = null;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to