Bug 5655 - HttpWebRequest not sending WebDAV headers
Summary: HttpWebRequest not sending WebDAV headers
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Martin Baulig
URL:
Depends on:
Blocks:
 
Reported: 2012-06-14 13:39 UTC by Bryan Moulton
Modified: 2012-09-05 16:20 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Bryan Moulton 2012-06-14 13:39:12 UTC
Whenever a user tries to use WebDAV methods in a web request ( MKCOL, SEARCH, etc. ) the request times out. This is because the headers aren't being sent with the stream. See the following:

https://github.com/mono/mono/blob/monotouch-2-0/mcs/class/System/System.Net/WebConnectionStream.cs#L611

In the SetHeaders method, the request must be sent chunked or with a ContentLength  >= 0. In order for WebDAV methods to work, the user must manually set one of these two properties even though content is optional in the WebDAV spec. With the .NET framework, this is not the case.
Comment 1 Zoltan Varga 2012-06-14 17:20:15 UTC
-> sys.web
Comment 2 Martin Baulig 2012-06-19 16:41:34 UTC
Ok, this one hangs when run with Mono on Linux, but works fine on Windows with .NET:

====
  var req = HttpWebRequest.Create ("http://192.168.16.102/dav/foo");
  req.Method = "MKCOL";
  var res = req.GetResponse ();
====
Comment 3 Martin Baulig 2012-09-05 16:20:56 UTC
Fixed; mono master commit f7db37a.