Summary: | kio_http remembering incorrect proxy username even after being corrected | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kio | Reporter: | Stuart Herring <stuart.herring> |
Component: | http | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | patch to invalidate proxy auth cache on error |
Description
Stuart Herring
2002-12-06 04:29:20 UTC
Subject: Re: New: kio_http remembering incorrect proxy username even after being corrected
> Summary: kio_http remembering incorrect proxy username even
> after being corrected
> Product: kio
> Version: unspecified
Which version of KDE are you using?
Cheers,
Waldo
CVS HEAD as of sometime last week. I'll update this weekend and see if I can still reproduce it. Regards, Stuart Created attachment 725 [details]
patch to invalidate proxy auth cache on error
This patch might help, please try
Subject: KDE_3_1_BRANCH: kdelibs/kioslave/http CVS commit by waba: CCMAIL: 51559-done@bugs.kde.org Refetch proxy credentials from kpasswd on error. (BR51559) M +14 -1 http.cc 1.551.2.10 M +1 -0 http.h 1.145.2.3 --- kdelibs/kioslave/http/http.cc #1.551.2.9:1.551.2.10 @@ -122,4 +122,5 @@ HTTPProtocol::HTTPProtocol( const QCStri m_bBusy = false; m_bFirstRequest = false; + m_bProxyAuthValid = false; m_iSize = NO_SIZE; @@ -205,4 +206,5 @@ void HTTPProtocol::resetSessionSettings( (!proxy.pass().isNull() && proxy.pass() != m_proxyURL.pass()) ) { + m_bProxyAuthValid = false; m_proxyURL = proxy; m_bUseProxy = m_proxyURL.isValid(); @@ -4790,4 +4792,14 @@ bool HTTPProtocol::getAuthorization() // We also do not use verify path unlike the pre-emptive // requests because we already know the realm value... + + if (m_bProxyAuthValid) + { + // Reset cached proxy auth + m_bProxyAuthValid = false; + KURL proxy = config()->readEntry("UseProxy"); + m_proxyURL.setUser(proxy.user()); + m_proxyURL.setPass(proxy.pass()); + } + info.verifyPath = false; if ( m_responseCode == 407 ) @@ -4893,4 +4905,5 @@ void HTTPProtocol::saveAuthorization() if ( m_prevResponseCode == 407 ) { + m_bProxyAuthValid = true; info.url = m_proxyURL; info.username = m_proxyURL.user(); --- kdelibs/kioslave/http/http.h #1.145.2.2:1.145.2.3 @@ -502,4 +502,5 @@ protected: bool m_bNeedTunnel; // Whether we need to make a SSL tunnel bool m_bIsTunneled; // Whether we have an active SSL tunnel + bool m_bProxyAuthValid; int m_iProxyPort; KURL m_proxyURL; |