[darcs-devel] darcs patch: add HTTP cache control headers to darcs.cgi

Juliusz Chroboczek Juliusz.Chroboczek at pps.jussieu.fr
Thu Apr 14 12:59:35 PDT 2005


> +# check if the requested resource has been modified since the client last
> +# saw it. If not send HTTP status code 304, otherwise set the Last-modified
> +# and Cache-control headers.

Wow.  This is the first time I see a CGI that can Do The Right Thing
against If-Modified-Since.

Minor nit: you should still be sending Cache-Control and Last-Modified
with the 304.  It's not a MUST (since it's not the case that ``the
field-value might differ from that sent in any previous response for
the same variant'' in the words of RFC 2616 10.3.5), but it cannot do
any harm.

I'd also suggest that you send ``Expires: 0'' in order to beat
HTTP/1.0 proxies that don't understand Cache-Control into compliance.

Why are you sending ``must-revalidate''?  I'd rather you respect the
cache administrator's decisions.

Next on your todo list (I hope): ETag and If-None-Match ;-)

                                        Juliusz




More information about the darcs-devel mailing list