Bug 3276 - Mono implementation of HttpWebRequest eats the body of a DELETE request
Summary: Mono implementation of HttpWebRequest eats the body of a DELETE request
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-02-08 14:27 UTC by Omri Gazitt
Modified: 2012-02-27 11:07 UTC (History)
2 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 Omri Gazitt 2012-02-08 14:27:19 UTC
http://stackoverflow.com/questions/9189081/is-monotouch-or-the-ios-web-stack-eating-my-http-delete-request-body

In WebConnectionStream.cs:705, the no_writestream bool is incorrectly set to true for the HTTP DELETE verb.  RFC 2616 does not prohibit a DELETE body (the same way it does for other verbs like TRACE and HEAD).

https://github.com/mono/mono/blob/master/mcs/class/System/System.Net/WebConnectionStream.cs#L705

The fix is trivial:

				bool no_writestream = (method == "GET" || method == "CONNECT" || method == "HEAD" ||
							method == "TRACE");

Thanks!
Comment 1 Gonzalo Paniagua Javier 2012-02-27 10:55:14 UTC
Fixed in master/4cb9ef3 and mono-2-10/74ec9d9