2009-06-28 Gonzalo Paniagua Javier <gonzalo@novell.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sun, 28 Jun 2009 07:17:33 +0000 (07:17 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sun, 28 Jun 2009 07:17:33 +0000 (07:17 -0000)
* HttpWebRequest.cs: fix 1.1 only test.

svn path=/trunk/mcs/; revision=137046

mcs/class/System/System.Net/ChangeLog
mcs/class/System/System.Net/HttpWebRequest.cs

index 1f1d60f5800a69aeac8dd622107b308bb56875a3..5dc243da1aa99cdb7c039c31a9d014880645a246 100644 (file)
@@ -1,3 +1,7 @@
+2009-06-28 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * HttpWebRequest.cs: fix 1.1 only test.
+
 2009-06-28 Gonzalo Paniagua Javier <gonzalo@novell.com>
 
        * WebConnectionStream.cs: when buffering the response, we have to set
index 7eada6004d2f148b65ea85e1f320c8d50d17b0cf..7f2e805b22a68cd81af0a7435398bf87f1fb4abb 100644 (file)
@@ -742,7 +742,8 @@ namespace System.Net
                                throw new ProtocolViolationException ("Method is null.");
 
 #if !NET_2_0
-                       bool send = (method == "PUT" || method == "POST");
+                       bool send = !(method == "GET" || method == "CONNECT" || method == "HEAD" ||
+                                               method == "TRACE" || method == "DELETE");
                        if (send && contentLength < 0 && !sendChunked && !allowBuffering && KeepAlive)
                                throw new ProtocolViolationException ("Buffering is disabled, ContentLength is negative and SendChunked is disabled.");