Just for the record, after digging up the code in arora (which is the next 
version of the browser demo) & sniffing the http traffic, the problem 
appears to be that the cookies that come back from the server are attached 
to a subdomain of the url host name and they are by default discarded 
by webkit.

So in the url I have something like: http://x1.x2.x3.com, while the cookies 
domain 
is x2.x3.com. Apparently these cookies are discarded.

Interesting enough, 
in the arora app someone added in the 
[cookiejar.cpp/List<QNetworkCookie> CookieJar::cookiesForUrl(const 
QUrl 
&url) const] the following block which fixed my problem. The block 
basically 
adds to the cookies list all the cookies that were assigned 
subdomains of 
the url host.

    // Not sure if this conforms to the 
cookie specification, in fact I am
    // pretty sure it incomplete and in 
the worst case a security hole.
    QList<QNetworkCookie> 
cookies;
    QString host = url.host();
    while 
(host.count(QLatin1Char('.')) > 0) {
        QUrl subUrl = url;
        
subUrl.setHost(host);
        cookies += 
QNetworkCookieJar::cookiesForUrl(subUrl);
        host = 
host.mid(host.indexOf(QLatin1Char('.')) + 1);
    }
    return 
cookies;


      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now at
http://ca.toolbar.yahoo.com.
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to