From 3d5f501adceb59d7ca1b07b6bda7668786843534 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Tue, 14 Jan 2014 16:24:45 +0400 Subject: [PATCH] SPDY: fixed possible premature close of stream. The "delayed" flag always should be set if there are unsent frames, but this might not be the case if ngx_http_spdy_body_filter() was called with NULL chain. As a result, the "send_timeout" timer could be set on a stream in ngx_http_writer(). And if the timeout occurred before all the stream data has been sent, then the request was finalized with the "client timed out" error. --- src/http/ngx_http_spdy_filter_module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/http/ngx_http_spdy_filter_module.c b/src/http/ngx_http_spdy_filter_module.c index e8cae552d..18f9ddd8a 100644 --- a/src/http/ngx_http_spdy_filter_module.c +++ b/src/http/ngx_http_spdy_filter_module.c @@ -635,6 +635,7 @@ ngx_http_spdy_body_filter(ngx_http_request_t *r, ngx_chain_t *in) if (in == NULL || r->header_only) { if (stream->queued) { + fc->write->delayed = 1; return NGX_AGAIN; }