Man, this is bad... I confused the Date and Last-Modified headers... I
guess my question now is whether httpd will offer a Last-Modified
header. Any information about that?

Thanks, and sorry again.

Best,

Ezequiel

On Sat, Nov 22, 2014 at 6:28 PM, Ezequiel Garzón
<[email protected]> wrote:
> Thank you, Rafael. I never took the time to read the appropriate RFC,
> and was used to the way pretty much everybody misuses this header then!
>
> Just as a random example (retrieved minutes ago):
>
> $ curl -I http://arxiv.org/abs/1008.0017
> HTTP/1.1 200 OK
> Set-Cookie: arxiv.web=R2323986704; path=/
> Date: Sat, 22 Nov 2014 17:24:49 GMT
> Server: Apache
> ETag: "Mon, 13 Dec 2010 15:21:22 GMT"
> Set-Cookie: browser=212.145.95.239.1416677089941516; path=/;
> max-age=946080000; domain=.arxiv.org
> Last-Modified: Mon, 13 Dec 2010 15:21:22 GMT
> Vary: Accept-Encoding,User-Agent
> Content-Type: text/html; charset=utf-8
>
> I'm sorry, everybody.
>
> Cheers,
>
> Ezequiel
>
> On Sat, Nov 22, 2014 at 6:09 PM, Rafael Neves <[email protected]> wrote:
>> On Sat, Nov 22, 2014 at 2:53 PM, Ezequiel Garzón
>> <[email protected]> wrote:
>>> Greetings! I'm using the original 5.6 release of OpenBSD, and httpd is
>>> using for the "Date" HTTP header the access time of the file instead of
>>> the modification time. Here are two consecutive requests:
>>>
>>> $ curl -I eze
>>> HTTP/1.1 200 OK
>>> Connection: keep-alive
>>> Content-Length: 1
>>> Content-Type: text/html
>>> Date: Sat, 22 Nov 2014 16:48:24 GMT
>>> Server: OpenBSD httpd
>>>
>>> $ curl -I eze
>>> HTTP/1.1 200 OK
>>> Connection: keep-alive
>>> Content-Length: 1
>>> Content-Type: text/html
>>> Date: Sat, 22 Nov 2014 16:48:29 GMT
>>> Server: OpenBSD httpd
>>>
>>> Has this been reported? Should I use sendbug(1)?
>>>
>>
>> Hi,
>>
>> Sorry, but I think the code is correct.
>> The HTTP/1.1. standard (RFC 7231) says in Section 7.1.1.2. that:
>> "The "Date" header field represents the date and time at which the
>>
>>    message was originated, having the same semantics as the Origination
>>    Date Field (orig-date) defined in Section 3.6.1 of [RFC5322].  The
>>    field value is an HTTP-date, as defined in Section 7.1.1.1.
>>
>>      Date = HTTP-date
>>
>>    An example is
>>
>>      Date: Tue, 15 Nov 1994 08:12:31 GMT
>>
>>    When a Date header field is generated, the sender SHOULD generate its
>>    field value as the best available approximation of the date and time
>>    of message generation.  In theory, the date ought to represent the
>>    moment just before the payload is generated.  In practice, the date
>>    can be generated at any time during message origination.
>>
>>    An origin server MUST NOT send a Date header field if it does not
>>    have a clock capable of providing a reasonable approximation of the
>>    current instance in Coordinated Universal Time.  An origin server MAY
>>    send a Date header field if the response is in the 1xx
>>    (Informational) or 5xx (Server Error) class of status codes.  An
>>    origin server MUST send a Date header field in all other cases."
>>
>> Regards,
>> Rafael

Reply via email to