Bug 31046 - HTTPClient does not comply with RFC
Summary: HTTPClient does not comply with RFC
Status: RESOLVED ANSWERED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Net.Http ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-06-11 21:56 UTC by Cody Beyer (MSFT)
Modified: 2015-06-12 04:13 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 ANSWERED

Description Cody Beyer (MSFT) 2015-06-11 21:56:15 UTC
### Description

The following line: https://github.com/mono/mono/blob/88d2b9da2a87b4e5c82abaea4e5110188d49601d/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpRequestHeaders.cs#L183

>AddOrRemove ("If-Modified-Since", value, Parser.DateTime.ToString);

Should instead be

>AddOrRemove ("If-Modified-Since", value, Parser.DateTime.ToString(R);

to comply with http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1

and to bring in line with .Net
Comment 1 Marek Safar 2015-06-12 04:13:36 UTC
ToString is method group not invocation in this case. There is nothing wrong with our code DateTime.ToString points to

https://github.com/mono/mono/blob/88d2b9da2a87b4e5c82abaea4e5110188d49601d/mcs/class/System.Net.Http/System.Net.Http.Headers/Parser.cs#L105