[PATCH] KHTML caching problem
Tobias Anton
Tobias.Anton at esc-electronics.de
Fri Aug 23 09:20:31 BST 2002
Hi!
at http://www.heise.de, KHTML's caching behaves wrong:
it loads http://www.heise.de, but then tries to set the expiredate for
http://www.heise.de/ (note the trailing slash!).
This is due to the fact that openURL issues a KIO request on the @param url.
But after that, m_url is set to the @param url:
m_url = url;
and then, m_url is fixed up:
if(m_url.protocol().startsWith( "http" ) && !m_url.host().isEmpty() &&
m_url.path().isEmpty()) {
m_url.setPath("/");
emit d->m_extension->setLocationBarURL( m_url.prettyURL() );
}
This is why in slotFinished, the wrong url is updated:
KIO::http_update_cache(m_url, false, d->m_doc->docLoader()->expireDate();
Attached is a patch that makes KHTML request the page which is used as base
url later on. Is it OK or should we better store the requested URL (the
parameter to openURL, i.e. the one without the default path "/") somewhere in
KHTMLPartPrivate and update the cache of that URL later on?
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loadrighturl.diff
Type: text/x-diff
Size: 2564 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20020823/89d83db8/attachment.diff>
More information about the kfm-devel
mailing list