Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_slice_filter_module.c @ 6321:bc9ea464e354
Slice filter: never run subrequests when main request is buffered.
With main request buffered, it's possible, that a slice subrequest will send
output before it. For example, while main request is waiting for aio read to
complete, a slice subrequest can start an aio operation as well. The order
in which aio callbacks are called is undetermined.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Tue, 08 Dec 2015 17:39:56 +0300 |
parents | 29f35e60840b |
children | 4f0f4f02c98f |
comparison
equal
deleted
inserted
replaced
6320:a6902a941279 | 6321:bc9ea464e354 |
---|---|
237 ngx_http_set_ctx(r, NULL, ngx_http_slice_filter_module); | 237 ngx_http_set_ctx(r, NULL, ngx_http_slice_filter_module); |
238 ngx_http_send_special(r, NGX_HTTP_LAST); | 238 ngx_http_send_special(r, NGX_HTTP_LAST); |
239 return rc; | 239 return rc; |
240 } | 240 } |
241 | 241 |
242 if (r->buffered) { | |
243 return rc; | |
244 } | |
245 | |
242 if (ngx_http_subrequest(r, &r->uri, &r->args, &sr, NULL, 0) != NGX_OK) { | 246 if (ngx_http_subrequest(r, &r->uri, &r->args, &sr, NULL, 0) != NGX_OK) { |
243 return NGX_ERROR; | 247 return NGX_ERROR; |
244 } | 248 } |
245 | 249 |
246 ngx_http_set_ctx(sr, ctx, ngx_http_slice_filter_module); | 250 ngx_http_set_ctx(sr, ctx, ngx_http_slice_filter_module); |