From 8ba626ccd71cbd704c7c69928d1d6fe58fd0445f Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Mon, 7 Dec 2015 16:30:48 +0300 Subject: Slice filter. Splits a request into subrequests, each providing a specific range of response. The variable "$slice_range" must be used to set subrequest range and proper cache key. The directive "slice" sets slice size. The following example splits requests into 1-megabyte cacheable subrequests. server { listen 8000; location / { slice 1m; proxy_cache cache; proxy_cache_key $uri$is_args$args$slice_range; proxy_set_header Range $slice_range; proxy_cache_valid 200 206 1h; proxy_pass http://127.0.0.1:9000; } } --- src/http/ngx_http_request.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/http/ngx_http_request.h') diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h index 967032aa1..8b881392d 100644 --- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h @@ -271,6 +271,7 @@ typedef struct { ngx_array_t cache_control; off_t content_length_n; + off_t content_offset; time_t date_time; time_t last_modified_time; } ngx_http_headers_out_t; @@ -530,6 +531,7 @@ struct ngx_http_request_s { unsigned filter_need_in_memory:1; unsigned filter_need_temporary:1; unsigned allow_ranges:1; + unsigned subrequest_ranges:1; unsigned single_range:1; unsigned disable_not_modified:1; -- cgit