From 13eb6898aac3dd30690918a36b06998236ec0d9c Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Sat, 7 Jul 2012 21:20:27 +0000 Subject: Entity tags: basic support in not modified filter. This includes handling of ETag headers (if present in a response) with basic support for If-Match, If-None-Match conditionals in not modified filter. 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). --- src/http/ngx_http_request.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/http/ngx_http_request.c') diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 26420b164..60d7b9249 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -93,6 +93,14 @@ ngx_http_header_t ngx_http_headers_in[] = { offsetof(ngx_http_headers_in_t, if_unmodified_since), ngx_http_process_unique_header_line }, + { ngx_string("If-Match"), + offsetof(ngx_http_headers_in_t, if_match), + ngx_http_process_unique_header_line }, + + { ngx_string("If-None-Match"), + offsetof(ngx_http_headers_in_t, if_none_match), + ngx_http_process_unique_header_line }, + { ngx_string("User-Agent"), offsetof(ngx_http_headers_in_t, user_agent), ngx_http_process_user_agent }, -- cgit