[libsoup] soup-auth-manager: don't send host auth to proxy servers



commit a51cd9ea7aa32444ff48b3f29f15c410581b6540
Author: Dan Winship <danw gnome org>
Date:   Wed May 15 11:27:44 2013 -0400

    soup-auth-manager: don't send host auth to proxy servers
    
    When sending a CONNECT request, don't include auth headers intended
    for the origin server. (And in particular, when doing NTLM through a
    proxy, don't assume that the NTLM auth succeeded because the proxy
    returned 200 to the CONNECT request.)
    
    Part of https://bugzilla.gnome.org/show_bug.cgi?id=698728

 libsoup/soup-auth-manager.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/libsoup/soup-auth-manager.c b/libsoup/soup-auth-manager.c
index b164791..3f230b1 100644
--- a/libsoup/soup-auth-manager.c
+++ b/libsoup/soup-auth-manager.c
@@ -679,13 +679,15 @@ soup_auth_manager_request_started (SoupSessionFeature *feature,
 
        g_mutex_lock (&priv->lock);
 
-       auth = lookup_auth (priv, msg);
-       if (auth) {
-               authenticate_auth (manager, auth, msg, FALSE, FALSE, FALSE);
-               if (!soup_auth_is_ready (auth, msg))
-                       auth = NULL;
+       if (msg->method != SOUP_METHOD_CONNECT) {
+               auth = lookup_auth (priv, msg);
+               if (auth) {
+                       authenticate_auth (manager, auth, msg, FALSE, FALSE, FALSE);
+                       if (!soup_auth_is_ready (auth, msg))
+                               auth = NULL;
+               }
+               soup_message_set_auth (msg, auth);
        }
-       soup_message_set_auth (msg, auth);
 
        auth = priv->proxy_auth;
        if (auth) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]