]> git.kaiwu.me - nginx.git/commitdiff
Upstream: simplified Accept-Ranges handling.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 30 May 2022 18:25:43 +0000 (21:25 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 30 May 2022 18:25:43 +0000 (21:25 +0300)
The u->headers_in.accept_ranges field is not used anywhere and hence removed.

src/http/ngx_http_upstream.c
src/http/ngx_http_upstream.h

index 4bf207ba1e9b32faa0ba7db3f486a3426b715a8a..b480f555944cee9a59082830b3938d09acb34185 100644 (file)
@@ -259,8 +259,7 @@ static ngx_http_upstream_header_t  ngx_http_upstream_headers_in[] = {
                  offsetof(ngx_http_headers_out_t, expires), 1 },
 
     { ngx_string("Accept-Ranges"),
-                 ngx_http_upstream_process_header_line,
-                 offsetof(ngx_http_upstream_headers_in_t, accept_ranges),
+                 ngx_http_upstream_ignore_header_line, 0,
                  ngx_http_upstream_copy_allow_ranges,
                  offsetof(ngx_http_headers_out_t, accept_ranges), 1 },
 
index c402d8334fe8a0d2d613c944499ca454d0f65f31..1ccfb8f92a86c032e874c82656d5a337a2ea6aa7 100644 (file)
@@ -280,7 +280,6 @@ typedef struct {
 
     ngx_table_elt_t                 *last_modified;
     ngx_table_elt_t                 *location;
-    ngx_table_elt_t                 *accept_ranges;
     ngx_table_elt_t                 *www_authenticate;
     ngx_table_elt_t                 *transfer_encoding;
     ngx_table_elt_t                 *vary;