Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_slice_filter_module.c @ 7070:f583559aadc7
Upstream: keep request body file from removal if requested.
The new request flag "preserve_body" indicates that the request body file should
not be removed by the upstream module because it may be used later by a
subrequest. The flag is set by the SSI (ticket #585), addition and slice
modules. Additionally, it is also set by the upstream module when a background
cache update subrequest is started to prevent the request body file removal
after an internal redirect. Only the main request is now allowed to remove the
file.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Wed, 19 Jul 2017 20:38:17 +0300 |
parents | e3723f2a11b7 |
children | 32a343635b50 |
comparison
equal
deleted
inserted
replaced
7069:863b862534d7 | 7070:f583559aadc7 |
---|---|
188 | 188 |
189 if (r != r->main) { | 189 if (r != r->main) { |
190 return rc; | 190 return rc; |
191 } | 191 } |
192 | 192 |
193 r->preserve_body = 1; | |
194 | |
193 if (r->headers_out.status == NGX_HTTP_PARTIAL_CONTENT) { | 195 if (r->headers_out.status == NGX_HTTP_PARTIAL_CONTENT) { |
194 if (ctx->start + (off_t) slcf->size <= r->headers_out.content_offset) { | 196 if (ctx->start + (off_t) slcf->size <= r->headers_out.content_offset) { |
195 ctx->start = slcf->size | 197 ctx->start = slcf->size |
196 * (r->headers_out.content_offset / slcf->size); | 198 * (r->headers_out.content_offset / slcf->size); |
197 } | 199 } |