[tor-commits] [torbrowser/master] Bug #3907: Provide Auth headers to on-modify-request
erinn at torproject.org
erinn at torproject.org
Sun Oct 23 23:18:30 UTC 2011
commit cf3b2270e3d6961d2fc8951f13d8093b9965bf3e
Author: Mike Perry <mikeperry-git at fscked.org>
Date: Fri Sep 2 15:52:58 2011 -0700
Bug #3907: Provide Auth headers to on-modify-request
Bug #3748 isn't fully solved without this patch.
Thanks again to Georg Koppen.
---
...th-headers-before-the-modify-request-obse.patch | 51 ++++++++++++++++++++
1 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/src/current-patches/0006-Add-HTTP-auth-headers-before-the-modify-request-obse.patch b/src/current-patches/0006-Add-HTTP-auth-headers-before-the-modify-request-obse.patch
new file mode 100644
index 0000000..3f270d6
--- /dev/null
+++ b/src/current-patches/0006-Add-HTTP-auth-headers-before-the-modify-request-obse.patch
@@ -0,0 +1,51 @@
+From 8c2bf692deecb4efbfd2e9c4eba1d702b89a0f05 Mon Sep 17 00:00:00 2001
+From: Mike Perry <mikeperry-git at fscked.org>
+Date: Fri, 2 Sep 2011 15:33:20 -0700
+Subject: [PATCH 6/6] Add HTTP auth headers before the modify-request observer.
+
+Otherwise, how are we supposed to modify them?
+
+Thanks to Georg Koppen for spotting both the problem and this fix.
+---
+ netwerk/protocol/http/nsHttpChannel.cpp | 11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp
+index 7038338..7a3254e 100644
+--- a/netwerk/protocol/http/nsHttpChannel.cpp
++++ b/netwerk/protocol/http/nsHttpChannel.cpp
+@@ -311,9 +311,6 @@ nsHttpChannel::Connect(PRBool firstTime)
+ return NS_ERROR_DOCUMENT_NOT_CACHED;
+ }
+
+- // check to see if authorization headers should be included
+- mAuthProvider->AddAuthorizationHeaders();
+-
+ if (mLoadFlags & LOAD_NO_NETWORK_IO) {
+ return NS_ERROR_DOCUMENT_NOT_CACHED;
+ }
+@@ -3687,6 +3684,9 @@ nsHttpChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *context)
+
+ AddCookiesToRequest();
+
++ // check to see if authorization headers should be included
++ mAuthProvider->AddAuthorizationHeaders();
++
+ // notify "http-on-modify-request" observers
+ gHttpHandler->OnModifyRequest(this);
+
+@@ -4758,7 +4758,10 @@ nsHttpChannel::DoAuthRetry(nsAHttpConnection *conn)
+ // this authentication attempt (bug 84794).
+ // TODO: save cookies from auth response and send them here (bug 572151).
+ AddCookiesToRequest();
+-
++
++ // check to see if authorization headers should be included
++ mAuthProvider->AddAuthorizationHeaders();
++
+ // notify "http-on-modify-request" observers
+ gHttpHandler->OnModifyRequest(this);
+
+--
+1.7.3.4
+
More information about the tor-commits
mailing list