Welcome! Log In Create A New Profile

Advanced

[nginx] Xslt: disabled ranges.

Roman Arutyunyan
July 23, 2020 05:02AM
details: https://hg.nginx.org/nginx/rev/1f3bf1734a77
branches:
changeset: 7686:1f3bf1734a77
user: Roman Arutyunyan <arut@nginx.com>
date: Wed Jul 22 22:16:19 2020 +0300
description:
Xslt: disabled ranges.

Previously, the document generated by the xslt filter was always fully sent
to client even if a range was requested and response status was 206 with
appropriate Content-Range.

The xslt module is unable to serve a range because of suspending the header
filter chain. By the moment full response xml is buffered by the xslt filter,
range header filter is not called yet, but the range body filter has already
been called and did nothing.

The fix is to disable ranges by resetting the r->allow_ranges flag much like
the image filter that employs a similar technique.

diffstat:

src/http/modules/ngx_http_xslt_filter_module.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 4f30f75dbdf3 -r 1f3bf1734a77 src/http/modules/ngx_http_xslt_filter_module.c
--- a/src/http/modules/ngx_http_xslt_filter_module.c Tue Jul 21 20:34:29 2020 +0300
+++ b/src/http/modules/ngx_http_xslt_filter_module.c Wed Jul 22 22:16:19 2020 +0300
@@ -233,6 +233,7 @@ ngx_http_xslt_header_filter(ngx_http_req
ngx_http_set_ctx(r, ctx, ngx_http_xslt_filter_module);

r->main_filter_need_in_memory = 1;
+ r->allow_ranges = 0;

return NGX_OK;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Xslt: disabled ranges.

Roman Arutyunyan 365 July 23, 2020 05:02AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 103
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready