Bug 372005 - [Patch] HTTP date format should be English and not follow user locale
Summary: [Patch] HTTP date format should be English and not follow user locale
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-03 00:08 UTC by Daniel
Modified: 2016-11-05 14:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.28


Attachments
Patch (1.26 KB, patch)
2016-11-03 00:08 UTC, Daniel
Details

Note You need to log in before you can comment on or make changes to this bug.
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