[libsoup/gnome-3-8] soup-auth-manager: don't send host auth to proxy servers
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/gnome-3-8] soup-auth-manager: don't send host auth to proxy servers
- Date: Wed, 15 May 2013 17:51:12 +0000 (UTC)
commit 4c9b47ddad17f427bd4c6d8c8671efa61a94f6f5
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]