Bug 372005

Summary: [Patch] HTTP date format should be English and not follow user locale
Product: [Frameworks and Libraries] frameworks-kio Reporter: Daniel <code>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: normal CC: kdelibs-bugs
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 5.28
Attachments: Patch

Description Daniel 2016-11-03 00:08:55 UTC
Created attachment 101989 [details]
Patch

Currently, KIO formats HTTP dates according to the user’s locale. This leads to cache-misses in non-English locales. The attached patch simplifies the implementation and switches it to always use English.
Comment 1 Daniel 2016-11-03 00:12:54 UTC
Examples of incorrectly generated headers (via Syndication in Akregator):

If-Modified-Since: di, 01 Nov 2016 14:06:55 GMT
If-Modified-Since: tir., 01 Nov 2016 22:37:15 GMT
If-Modified-Since: l%f8r., 22 Oct 2016 20:07:32 GMT
Comment 2 David Faure 2016-11-05 14:33:21 UTC
Thanks for the patch. Indeed, I see the issue, and the fix works.

For future patches you can use https://git.reviewboard.kde.org btw ;-)
Comment 3 David Faure 2016-11-05 14:34:05 UTC
Git commit 64aff94b178b293f6695b16ffe00e6031700c15d by David Faure, on behalf of Daniel Aleksandersen.
Committed on 05/11/2016 at 14:18.
Pushed by dfaure into branch 'master'.

Fix HTTP date format sent by kio_http to always use the C locale.

* Must use English rather than the user’s locale.
* Simplified implementation.
FIXED-IN: 5.28

M  +1    -8    src/ioslaves/http/http.cpp

http://commits.kde.org/kio/64aff94b178b293f6695b16ffe00e6031700c15d