Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2010-03-27 19:27:14 +0300
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2010-03-27 19:27:14 +0300
commit014d345b9ea903a0aaac0a4ed6ecb7669f15a960 (patch)
tree634208df95d8ea30bc4149e60aa8e7c6a5847c9f /mcs
parent887d18c4ea3add1fc14ceecd32def2186b6e036f (diff)
2010-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
* HttpWebRequest.cs: when PreAuthenticate is true, don't remove the existing authorization related headers until we know we have a replacement. Fixes bug #591633. svn path=/branches/mono-2-6/mcs/; revision=154347
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/System/System.Net/HttpWebRequest.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/mcs/class/System/System.Net/HttpWebRequest.cs b/mcs/class/System/System.Net/HttpWebRequest.cs
index f35109c7000..fec24dc3914 100644
--- a/mcs/class/System/System.Net/HttpWebRequest.cs
+++ b/mcs/class/System/System.Net/HttpWebRequest.cs
@@ -1055,14 +1055,14 @@ namespace System.Net
void DoPreAuthenticate ()
{
- webHeaders.RemoveInternal ("Proxy-Authorization");
- webHeaders.RemoveInternal ("Authorization");
bool isProxy = (proxy != null && !proxy.IsBypassed (actualUri));
ICredentials creds = (!isProxy || credentials != null) ? credentials : proxy.Credentials;
Authorization auth = AuthenticationManager.PreAuthenticate (this, creds);
if (auth == null)
return;
+ webHeaders.RemoveInternal ("Proxy-Authorization");
+ webHeaders.RemoveInternal ("Authorization");
string authHeader = (isProxy && credentials == null) ? "Proxy-Authorization" : "Authorization";
webHeaders [authHeader] = auth.Message;
usedPreAuth = true;