Bug 172182 - HTTP cache cleaner is broken and makes caching mostly useless
Summary: HTTP cache cleaner is broken and makes caching mostly useless
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: http (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-05 11:38 UTC by Brendon Higgins
Modified: 2008-11-07 16:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brendon Higgins 2008-10-05 11:38:02 UTC
Version:            (using KDE 4.1.2)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Took me a while to figure out what was going on here.

http_cache_cleaner is broken. Upon running it removes *all* files in the cache, making the whole thing pointless.

CACHE_REVISION has alternate definitions. In kioslave/http/http_cache_cleaner.cpp:
#define CACHE_REVISION "7\n"
In kio/kio/http_slave_defaults.h
#define CACHE_REVISION                  "9\n"           // Cache version

So the cache files are saved as revision 9 files, but the cleaner doesn't deal with them because they aren't revision 7. So it deletes everything.

I have no idea if the formats are actually different. On a quick scan I didn't notice any difference in the way the files were being read between http_cache_cleaner.cpp and http.cpp.

So much for 
// !START OF SYNC!
// Keep the following in sync with the cache code in http.cc
Oh, to have a KDE release that doesn't introduce some awful new bug. *sigh* ;-)

Peace,
Brendon
Comment 1 Maksim Orlovich 2008-10-05 16:31:14 UTC
Thanks for the catch
Comment 2 Andreas Hartmetz 2008-10-22 22:52:32 UTC
SVN commit 874941 by ahartmetz:

- Sync CACHE_REVISION with http.cpp. Versions 7 and 9 should be compatible
  (I checked) so it's enough to just bump the version.
- Set version of http_cache_cleaner binary to 9, in sync with cache format
  revision.
BUG:172182


 M  +3 -5      http_cache_cleaner.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=874941
Comment 3 Brendon Higgins 2008-11-07 02:23:23 UTC
Baww. :'( This patch isn't in 4.1.3: http://websvn.kde.org/tags/KDE/4.1.3/kdelibs/kioslave/http/http_cache_cleaner.cpp?view=markup

I'm sure this causes other weird browsing hiccups (like downloading webpages stopping for no reason). I can't use Konqueror while this bug still exists.
Comment 4 Rex Dieter 2008-11-07 16:21:21 UTC
SVN commit 881252 by rdieter:

backport fix for bug #172182

CCBUG: 172182


 M  +3 -3      http_cache_cleaner.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=881252