projects
/
collection4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
55edccd
)
src/utils_params.c: Actually, "gmtime_r" is required according to RFC 1123.
author
Florian Forster
<ff@octo.it>
Fri, 18 Jun 2010 20:58:43 +0000
(22:58 +0200)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Fri, 18 Jun 2010 20:58:43 +0000
(22:58 +0200)
src/utils_params.c
patch
|
blob
|
history
diff --git
a/src/utils_params.c
b/src/utils_params.c
index
9f1e4e0
..
5b63334
100644
(file)
--- a/
src/utils_params.c
+++ b/
src/utils_params.c
@@
-275,13
+275,13
@@
int time_to_rfc1123 (time_t t, char *buffer, size_t buffer_size) /* {{{ */
struct tm tm_tmp;
size_t status;
struct tm tm_tmp;
size_t status;
- /*
Apparently Apache or FastCGI doesn't honor the timezone information and
- *
thus "fixes" the last modified header when the timezone information is
- *
east of GMT. With "gmtime_r" this problem doesn't occu
r. */
+ /*
RFC 1123 *requires* the time to be GMT and the "GMT" timezone string.
+ *
Apache will ignore the timezone if "localtime_r" and "%z" is used,
+ *
resulting in weird behavio
r. */
if (gmtime_r (&t, &tm_tmp) == NULL)
return (errno);
if (gmtime_r (&t, &tm_tmp) == NULL)
return (errno);
- status = strftime (buffer, buffer_size, "%a, %d %b %Y %T
%z
", &tm_tmp);
+ status = strftime (buffer, buffer_size, "%a, %d %b %Y %T
GMT
", &tm_tmp);
if (status == 0)
return (errno);
if (status == 0)
return (errno);