mirror of
https://github.com/nginx/nginx.git
synced 2026-08-04 14:58:20 +00:00
Slice filter: fetch slices in cloned subrequests.
Previously, slice subrequest location was selected based on request URI. If request is then redirected to a new location, its context array is cleared, making the slice module loose current slice range information. This lead to broken output. Now subrequests with the NGX_HTTP_SUBREQUEST_CLONE flag are created for slices. Such subrequests stay in the same location as the parent request and keep the right slice context.
This commit is contained in:
parent
3e4339eacd
commit
b9a031622b
1 changed files with 4 additions and 1 deletions
|
|
@ -244,7 +244,10 @@ ngx_http_slice_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||
return rc;
|
||||
}
|
||||
|
||||
if (ngx_http_subrequest(r, &r->uri, &r->args, &sr, NULL, 0) != NGX_OK) {
|
||||
if (ngx_http_subrequest(r, &r->uri, &r->args, &sr, NULL,
|
||||
NGX_HTTP_SUBREQUEST_CLONE)
|
||||
!= NGX_OK)
|
||||
{
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue