2006-04-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / System / System.Net / HttpWebRequest.cs
index df428424f281a5405028b0e05a3f611b831926a0..aac0cb5ce88ac5cd6288a89a0ee808686b4126bc 100644 (file)
@@ -981,7 +981,7 @@ namespace System.Net
                                contentLength = bodyBufferLength;
                                writeStream.SendChunked = false;
                        }
-                       
+
                        SendRequestHeaders ();
 
                        haveRequest = true;
@@ -1144,7 +1144,7 @@ namespace System.Net
                        if (throwMe == null && webResponse != null) {
                                code  = webResponse.StatusCode;
                                if (!authCompleted && ((code == HttpStatusCode.Unauthorized && credentials != null) ||
-                                                       code == HttpStatusCode.ProxyAuthenticationRequired)) {
+                                    (ProxyQuery && code == HttpStatusCode.ProxyAuthenticationRequired))) {
                                        if (!usedPreAuth && CheckAuthorization (webResponse, code)) {
                                                // Keep the written body, so it can be rewritten in the retry
                                                if (InternalAllowBuffering) {