2016-07-02 18:27 GMT+02:00 Yann Ylavic <ylavic....@gmail.com>: > On Sat, Jul 2, 2016 at 4:39 PM, William A Rowe Jr <wr...@rowe-clan.net> > wrote: > > Relevant data points... > > > > https://tools.ietf.org/html/rfc7231#section-7.1.1.1 > > > > There is no other supported time zone except GMT representing GMT. That > is > > the only value we may send. > > > > "Recipients of timestamp values are encouraged to be robust in parsing > > timestamps unless otherwise restricted by the field definition. For > example, > > messages are occasionally forwarded over HTTP from a non-HTTP source that > > might generate any of the date and time specifications defined by the > > Internet Message Format. " > > > > We may accept an unusual timezone but should reformat as GMT in the > > response. > > Great, that avoids double-parsing the date (but for TRACE1), so the > patch (attached) is no more introducing more cycles. >
Elengant and simple, I like it! For some reason I thought that the "l" variable (containing the LM header sent from FCGI) was lost in the update process, but I was clearly wrong. Next time I'll try harder before committing! Tested with a simple PHP script returning different Last-Modified header values, sleeping two seconds before returning anything (this is useful to check if httpd modifies the original date/time with now): 1) tomorrow - (Last-Modified sent: Mon, 04 Jul 2016 00:00:00 +0000) [Sun Jul 03 09:29:11.510944 2016] [proxy_fcgi:trace4] [pid 16253:tid 140672292075264] util_script.c(564): [client ::1:52295] Last-Modified: Mon, 04 Jul 2016 00:00:00 +0000 [Sun Jul 03 09:29:11.510955 2016] [proxy_fcgi:trace1] [pid 16253:tid 140672292075264] util_script.c(686): [client ::1:52295] The Last-Modified header value 'Mon, 04 Jul 2016 00:00:00 +0000' (in the future) has been replaced with 'Sun, 03 Jul 2016 09:29:11 GMT' [Sun Jul 03 09:29:11.510998 2016] [http:trace4] [pid 16253:tid 140672292075264] http_filters.c(850): [client ::1:52295] Last-Modified: Sun, 03 Jul 2016 09:29:11 GMT 2) now in Europe/Paris timezone (Last-Modified sent: Sun, 03 Jul 2016 11:30:10 +0200) [Sun Jul 03 09:30:12.133260 2016] [proxy_fcgi:trace4] [pid 16253:tid 140672275289856] util_script.c(564): [client ::1:52297] Last-Modified: Sun, 03 Jul 2016 11:30:10 +0200 [Sun Jul 03 09:30:12.133272 2016] [proxy_fcgi:trace1] [pid 16253:tid 140672275289856] util_script.c(686): [client ::1:52297] The Last-Modified header value 'Sun, 03 Jul 2016 11:30:10 +0200' (non GMT) has been replaced with 'Sun, 03 Jul 2016 09:30:10 GMT' [Sun Jul 03 09:30:12.133374 2016] [http:trace4] [pid 16253:tid 140672275289856] http_filters.c(850): [client ::1:52297] Last-Modified: Sun, 03 Jul 2016 09:30:10 GMT 3) now in GMT (Last-Modified sent: Sun, 03 Jul 2016 09:31:57 +0000) [Sun Jul 03 09:31:59.631573 2016] [proxy_fcgi:trace4] [pid 16253:tid 140672250111744] util_script.c(564): [client ::1:52301] Last-Modified: Sun, 03 Jul 2016 09:31:57 +0000 [Sun Jul 03 09:31:59.631635 2016] [http:trace4] [pid 16253:tid 140672250111744] http_filters.c(850): [client ::1:52301] Last-Modified: Sun, 03 Jul 2016 09:31:57 GMT Note that in case 2) httpd does not set now() but uses the original date value sent by FCGI modified to GMT. Patch committed to trunk in http://svn.apache.org/r1751138 Updated backport proposal and trunk's CHANGES. Thanks a lot Yann and William! Regards, Luca