# HG changeset patch # User Valentin Bartenev # Date 1389702285 -14400 # Node ID 9fffc0c46e5c275428d04798cc6a531951e79630 # Parent dfb52d25cefb62eb715755b6e2361dfab4125dc0 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. diff --git a/src/http/ngx_http_spdy_filter_module.c b/src/http/ngx_http_spdy_filter_module.c --- 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_reque if (in == NULL || r->header_only) { if (stream->queued) { + fc->write->delayed = 1; return NGX_AGAIN; }