[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: kdelibs/kioslave/http/kcookiejar
From: "Dawit A." <adawit () kde ! org>
Date: 2004-10-04 3:29:22
Message-ID: 200410032329.22448.adawit () kde ! org
[Download RAW message or body]
On Sunday 03 October 2004 22:48, Dawit A. wrote:
> On Sunday 03 October 2004 22:22, Dawit A. wrote:
> > On Sunday 03 October 2004 18:08, Benjamin Meyer wrote:
> > > Using the old [0] way go into Konq and specify "slashdot.org : Reject"
> > >
> > > Now using dcop how would I determine slashdot.org is set to Reject?
> > >
> > > All of these will return Dunno and not Reject (which is another issue I
> > > have already sent to Waldo):
> > > dcop kcookiejar kcookiejar getDomainAdvice http://.slashdot.org
> > > dcop kcookiejar kcookiejar getDomainAdvice http://slashdot.org
> > > dcop kcookiejar kcookiejar getDomainAdvice http://www.slashdot.org
> > >
> > > Even though everything from slashdot.org is being Rejected.
> >
> > Try the attached patch, but you have to revert your own patch first.
>
> Ooops, attached the wrong patch! Here is the correct one. Hmm...
> KCookieJar::cookieAdvice might need this fix as well.
*sigh* I hate keeping multiple copies of the same freaking patch!!!
Please ignore all the previous ones and use this one instead. I promise this
is the last time. Good night...
--
Regards,
Dawit A.
"Preach what you practice, practice what you preach"
["kcookieserver-2.diff" (text/x-diff)]
Index: kcookieserver.cpp
===================================================================
RCS file: /home/kde/kdelibs/kioslave/http/kcookiejar/kcookieserver.cpp,v
retrieving revision 1.50.2.5
diff -u -p -b -B -w -r1.50.2.5 kcookieserver.cpp
--- kcookieserver.cpp 29 Jul 2004 01:49:40 -0000 1.50.2.5
+++ kcookieserver.cpp 4 Oct 2004 03:23:45 -0000
@@ -567,15 +567,28 @@ KCookieServer::setDomainAdvice(QString u
QString
KCookieServer::getDomainAdvice(QString url)
{
- KCookieAdvice advice = KCookieDunno;
QString fqdn;
QString dummy;
+ KCookieAdvice advice = KCookieDunno;
+
if (KCookieJar::parseURL(url, fqdn, dummy))
{
QStringList domains;
mCookieJar->extractDomains(fqdn, domains);
- advice = mCookieJar->getDomainAdvice(domains[0]);
+
+ QStringList::ConstIterator it = domains.fromLast();
+ while ( (advice == KCookieDunno) && (it != domains.end()) )
+ {
+ // Always check advice in both ".domain" and "domain". Note
+ // that we only want to check "domain" if it matches the
+ // fqdn of the requested URL.
+ if ( (*it)[0] == '.' || (*it) == fqdn )
+ advice = mCookieJar->getDomainAdvice(*it);
+
+ it--;
}
+ }
+
return KCookieJar::adviceToStr(advice);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic