Bug 41552 - HttpResponseMessage does not support multiple Links header entries
Summary: HttpResponseMessage does not support multiple Links header entries
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Net.Http ()
Version: 4.5.X
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
Depends on:
Reported: 2016-06-07 11:59 UTC by Mike Parker
Modified: 2016-06-20 13:45 UTC (History)
2 users (show)

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:

Description Mike Parker 2016-06-07 11:59:20 UTC
HttpResponseMessage doesn't support multiple entries for the Link header. We use several APIs that specify multiple Link fields which works on .NET but does not work with the Mono implementation.

What seems to happen is the final Link is kept as a single header and overwrites all previous entries.



Comes through as 


From a cursory look at the implementation, perhaps the collection here https://github.com/mono/mono/blob/master/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs

Should include Links as a multi collection, or more generally perhaps any other header field not currently added as a collection should support this by default?
Comment 1 Mike Parker 2016-06-07 14:23:37 UTC
After some further investigation, it looks like the problem is around WebRequest in System.Net, rather than inside HttpHeaders.

This means we see the same behaviour using Microsofts System.Net.Http library whilst it's still using Mono System.Net.
Comment 2 Marek Safar 2016-06-10 11:07:05 UTC
Fixed in master and Mono 4.5.1
Comment 3 Mike Parker 2016-06-10 11:11:36 UTC
Nice - thanks for speedy resolution.
Comment 4 Mike Parker 2016-06-20 13:45:51 UTC
Do you know when this is due for release?