Bug 44037 - System.Net.WebClient not passing HttpRequestHeader.Authorization header
Summary: System.Net.WebClient not passing HttpRequestHeader.Authorization header
Status: VERIFIED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: 4.6.0 (C8)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-09-06 20:36 UTC by Bill Holmes
Modified: 2016-09-06 22:35 UTC (History)
3 users (show)

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


Attachments
Program to reproduce (1.84 KB, text/plain)
2016-09-06 20:36 UTC, Bill Holmes
Details


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:
VERIFIED FIXED

Description Bill Holmes 2016-09-06 20:36:39 UTC
Created attachment 17355 [details]
Program to reproduce

Compile and run the attached cs file.

mcs test.cs
mono test.exe

Expected Output: 
Listening...
The values of the Connection header are:
   Keep-Alive
The values of the Authorization header are:
   Basic SGVsbG9UaGVyZUtleQ==
The values of the Host header are:
   localhost:8080

Actual Output:
Listening...
The values of the Connection header are: 
   keep-alive
The values of the Host header are: 
   localhost:8080

Notice the Authorization header is missing.  

This did work in Mono 4.4.2.11
Comment 1 Oleg Demchenko 2016-09-06 22:13:39 UTC
Seems to be fixed in latest version of mono from 4.6.0 branch.

Test app output: https://gist.github.com/olegoid/2e4427d0f42004618c77938ae77e19b8

Exact test env: https://gist.github.com/anonymous/f3097b6182fe495630d73faf318d75ff
Comment 2 Alexander Köplinger [MSFT] 2016-09-06 22:35:28 UTC
Yep, seems to be a duplicate of https://bugzilla.xamarin.com/show_bug.cgi?id=42408 which was fixed with https://github.com/mono/mono/commit/43b6145b58236c9d2b892f724fb3595ea3ad0c13