comparison src/http/ngx_http_request.h @ 5735:5fb1e57c758a

Entity tags: explicit flag to skip not modified filter. Previously, last_modified_time was tested against -1 to check if the not modified filter should be skipped. Notably, this prevented nginx from additional If-Modified-Since (et al.) checks on proxied responses. Such behaviour is suboptimal in some cases though, as checks are always skipped on responses from a cache with ETag only (without Last-Modified), resulting in If-None-Match being ignored in such cases. Additionally, it was not possible to return 412 from the If-Unmodified-Since if last modification time was not known for some reason. This change introduces explicit r->disable_not_modified flag instead, which is set by ngx_http_upstream_process_headers().
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 26 Jun 2014 02:27:11 +0400
parents 777202558122
children 8dfee01ff0bd
comparison
equal deleted inserted replaced
5734:af229f8cf987 5735:5fb1e57c758a
526 unsigned main_filter_need_in_memory:1; 526 unsigned main_filter_need_in_memory:1;
527 unsigned filter_need_in_memory:1; 527 unsigned filter_need_in_memory:1;
528 unsigned filter_need_temporary:1; 528 unsigned filter_need_temporary:1;
529 unsigned allow_ranges:1; 529 unsigned allow_ranges:1;
530 unsigned single_range:1; 530 unsigned single_range:1;
531 unsigned disable_not_modified:1;
531 532
532 #if (NGX_STAT_STUB) 533 #if (NGX_STAT_STUB)
533 unsigned stat_reading:1; 534 unsigned stat_reading:1;
534 unsigned stat_writing:1; 535 unsigned stat_writing:1;
535 #endif 536 #endif