Changes between Initial Version and Version 1 of Ticket #2176


Ignore:
Timestamp:
05/03/21 13:22:50 (3 years ago)
Author:
rjorel@…
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2176 – Description

    initial v1  
    55I thought that reading source code should be the best solution to understand how etags are generated and how Nginx uses them to generate 304 responses. But I was surprised to read that in {{{src/http/modules/ngx_http_not_modified_filter_module.c}}}:
    66
    7 {{{
     7{{{#!c
    88        if (r->headers_in.if_modified_since
    99            && ngx_http_test_if_modified(r))
     
    2424
    2525So, to be sure that resource validation via etags was done after last modified times, I deactivate {{{If-Modified-Since}}} check with directive {{{if_modified_since off;}}}. After that, I no longer got any 304 responses but only 200 ones. I thought that etag check didn't work, but reading {{{ngx_http_test_if_modified}}} function gave me a clue:
    26 {{{
     26{{{#!c
    2727static ngx_uint_t
    2828ngx_http_test_if_modified(ngx_http_request_t *r)