Welcome! Log In Create A New Profile

Advanced

Re: 1.3.x if-none-match only works if las-modified set

Maxim Dounin
March 11, 2013 01:42PM
Hello!

On Mon, Mar 11, 2013 at 01:04:32PM -0400, Brian Akins wrote:

> in ngx_http_not_modified_header_filter
>
> if (r->headers_out.status != NGX_HTTP_OK
> || r != r->main
> || r->headers_out.last_modified_time == -1)
> {
>
> So, it only checks if-match or if-none-match if last-modified is set.
> Is this on purpose? I'm just wondering if we want to be able to check
> etime without checking last-modified.

The following commit log suggests it was done intentionally,
http://trac.nginx.org/nginx/changeset/4745/nginx:

: Note that the "r->headers_out.last_modified_time == -1" check in the not
: modified filter is left as is intentionally. It's to prevent handling
: of If-* headers in case of proxy without cache (much like currently
: done with If-Modified-Since).

Changing the code to work with ETag from cache without
Last-Modified being present in a cached response should be
possible, but it will require some additional changes.

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

1.3.x if-none-match only works if las-modified set

Brian Akins 746 March 11, 2013 01:06PM

Re: 1.3.x if-none-match only works if las-modified set

Maxim Dounin 468 March 11, 2013 01:42PM

Re: 1.3.x if-none-match only works if las-modified set

Brian Akins 609 March 11, 2013 02:10PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 127
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready