Review Request 126857: kio_http: fix porting bugs which broke caching.

David Faure faure at kde.org
Sat Jan 23 21:23:17 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126857/
-----------------------------------------------------------

Review request for KDE Frameworks.


Repository: kio


Description
-------

CacheLocation was used instead of GenericCacheLocation, so the appname was inserted
into it which would have broken sharing the cache between apps. But anyway no
caching happened at all because the subdir of the cache wasn't being created
(missing mkpath).

Repairing the use of the cache brought up an assert just after writing, because
the size of cache entries wasn't the expected size; this was due to mtime -> QDateTime
porting. Repaired by converting to "seconds since epoch", like kdelibs4 was doing.
Milliseconds don't seem to be part of the RFCs for HTTP dates anyway.

Change-Id: Ie13c9923f02429a8b1893ba9f66f733673d5ddad


Diffs
-----

  src/core/kprotocolmanager.cpp bd42c9e1bb6379238a46c6483f12bcbc9ccc0e6d 
  src/core/sessiondata.cpp d21ab21581da3f5bf3dc31c012d0056f50af3423 
  src/ioslaves/http/http.cpp 76da711cbb3eee9ba801a6e8117d78aaee467626 

Diff: https://git.reviewboard.kde.org/r/126857/diff/


Testing
-------

I spotted the error below in kio_http's output
HTTPProtocol::cacheFileOpenWrite: Could not open file for writing: "" due to error 5

(First fix was to fix the debug output not to show an empty filename on error)

Now kio_http says lots of good things like "readBody: reading data from cache..."


Thanks,

David Faure

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160123/1e3a618c/attachment.html>


More information about the Kde-frameworks-devel mailing list