diff options
Diffstat (limited to 'src/http/ngx_http_postpone_filter_module.c')
-rw-r--r-- | src/http/ngx_http_postpone_filter_module.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/http/ngx_http_postpone_filter_module.c b/src/http/ngx_http_postpone_filter_module.c index b90d33e26..20a78a00c 100644 --- a/src/http/ngx_http_postpone_filter_module.c +++ b/src/http/ngx_http_postpone_filter_module.c @@ -96,7 +96,9 @@ ngx_http_postpone_filter(ngx_http_request_t *r, ngx_chain_t *in) if (r->postponed) { out = r->postponed->out; - r->postponed = r->postponed->next; + if (out) { + r->postponed = r->postponed->next; + } } else { out = in; @@ -104,7 +106,10 @@ ngx_http_postpone_filter(ngx_http_request_t *r, ngx_chain_t *in) rc = NGX_OK; - if (out || r->main->out || r->main->connection->buffered) { + if (out + || (r->connection->buffered + & (NGX_HTTP_LOWLEVEL_BUFFERED|NGX_LOWLEVEL_BUFFERED))) + { ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http postpone filter out \"%V?%V\"", &r->uri, &r->args); @@ -170,6 +175,10 @@ ngx_http_postpone_filter_output_postponed_request(ngx_http_request_t *r) pr = r->postponed; } + if (pr == NULL) { + return NGX_OK; + } + out = pr->out; if (out) { |