[Mono-bugs] [Bug 51972][Nor] New - HttpWebRequest only allows a body if the method is PUT or POST

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 9 Dec 2003 18:13:59 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by lmaloney@bigpond.net.au.

http://bugzilla.ximian.com/show_bug.cgi?id=51972

--- shadow/51972	2003-12-09 18:13:58.000000000 -0500
+++ shadow/51972.tmp.26321	2003-12-09 18:13:58.000000000 -0500
@@ -0,0 +1,49 @@
+Bug#: 51972
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lmaloney@bigpond.net.au               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: HttpWebRequest only allows a body if the method is PUT or POST
+
+Steps to reproduce the problem:
+1. Compile and run the attached code.  It attempts to send a WebDAV
+PROPFIND method.
+
+Actual Results:
+Unhandled Exception: System.Net.ProtocolViolationException: Cannot send
+data when method is: PROPFIND
+in <0x00107> System.Net.HttpWebRequest:BeginGetRequestStream
+(System.AsyncCallback,object)
+in <0x00022> System.Net.HttpWebRequest:GetRequestStream ()
+in <0x0008c> System.Net.WebClient:UploadData (string,string,byte[])
+in <0x0007d> (wrapper remoting-invoke-with-check)
+System.Net.WebClient:UploadData (string,string,byte[])
+in <0x0011b> .WebClientBug:Main ()
+
+
+Expected Results:
+Unhandled Exception: System.Net.WebException: The remote server returned an
+error: (401) Unauthorized.
+   at System.Net.HttpWebRequest.CheckFinalStatus()
+   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
+   at System.Net.HttpWebRequest.GetResponse()
+   at System.Net.WebClient.UploadData(String address, String method, Byte[]
+data)
+   at WebClientBug.Main()
+
+This exception will not be thrown if the URI is changed to one that allows
+anonymous WebDAV access.
+
+How often does this happen? 
+Always