Mailing List Archive

last-modified date checks
A while back someone (I think it was Rob H) was talking about changing
the code that handles if-modified-since to make it so that the date
check was an exact match instead of seeing if the last modified date
was before the IMS date.

Did you guys ever implement that change? I seem to remember some
problems being brought up with it. The only thing I remember is that
it can't just be a strcmp() because of the way we all have to support
three date formats. Was there another problem? Did you guys ever
deploy a server that did this?

The reason I ask is that we're finding people with systems that are
setting LM dates to whacky times such as April 1, 2010. That means the
file stays in everybody's browser cache indefinitely. The browser
people want us to change Netsite so it uses an exact match which seems
okay to me but I wanted to see if you had problems with it.

--Rob
Re: last-modified date checks [ In reply to ]
Nope --- in fact, later_than is one of the relatively few functions which
still looks more or less the way it did in the NCSA code even in 0.8.x.
But this sounds like a question for Roy in any event...

rst
Re: last-modified date checks [ In reply to ]
>A while back someone (I think it was Rob H) was talking about changing
>the code that handles if-modified-since to make it so that the date
>check was an exact match instead of seeing if the last modified date
>was before the IMS date.

I think that was an efficiency question -- check for an exact match
first, and only do the date-parsing comparison if the two differ.

>The reason I ask is that we're finding people with systems that are
>setting LM dates to whacky times such as April 1, 2010. That means the
>file stays in everybody's browser cache indefinitely. The browser
>people want us to change Netsite so it uses an exact match which seems
>okay to me but I wanted to see if you had problems with it.

Tell the browser people to fix their bugs first, before changing
the server. I read the http-wg list first, so I've already answered
this question there today.

I do think it would be wise for a server to complain about bad
time data on the files it serves. We know the server's date is
fairly accurate due to the network requirements, but the file
server may be in bizarro land. The correct thing for it to do
is to inform the owners of the files to correct their dates,
but that is often an off-line operation. I think it is reasonable
for the server to refuse to send a Last-Modified date if the date
is later than the time it is serving the file.

.......Roy
Re: last-modified date checks [ In reply to ]
/*
* "Re: last-modified date checks " by Roy Fielding <fielding@beach.w3.org>
* written Tue, 15 Aug 1995 17:48:04 -0400
*
* Tell the browser people to fix their bugs first, before changing
* the server. I read the http-wg list first, so I've already
* answered this question there today.

Yeah, he kind of surprised me on that one.

* I do think it would be wise for a server to complain about bad time
* data on the files it serves.

Complain to who, though? Log an error?

* I think it is reasonable for the server to
* refuse to send a Last-Modified date if the date is later than the
* time it is serving the file.
*/

That sounds reasonable.

I happen to agree that having Netscape stop sending IMS for a forced
reload would be a good thing.

--Rob
Re: last-modified date checks [ In reply to ]
> * I do think it would be wise for a server to complain about bad time
> * data on the files it serves.
>
>Complain to who, though? Log an error?

Yep, that's what I meant. It's too bad you can't program in a little
electro-shock therapy -- it sure would cut down on the bug reports.

.....Roy