* HttpWebRequest.cs: fixed checking if method allows a body. Patch by
Benjamin Jemlich (pcgod@gmx.net).
svn path=/trunk/mcs/; revision=21062
+2003-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HttpWebRequest.cs: fixed checking if method allows a body. Patch by
+ Benjamin Jemlich (pcgod@gmx.net).
+
2003-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* HttpWebRequest.cs: deal with authentication schemes that have more
if (aborted)
throw new WebException ("The request was previosly aborted.");
- bool send = (method == "PUT" || method == "POST");
+ bool send = !(method == "GET" || method == "CONNECT" || method == "HEAD");
if (method == null || !send)
throw new ProtocolViolationException ("Cannot send data when method is: " + method);