]> git.kaiwu.me - nginx.git/commitdiff
SPDY: fixed possible premature close of stream.
authorValentin Bartenev <vbart@nginx.com>
Tue, 14 Jan 2014 12:24:45 +0000 (16:24 +0400)
committerValentin Bartenev <vbart@nginx.com>
Tue, 14 Jan 2014 12:24:45 +0000 (16:24 +0400)
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

index e8cae552dc109f3e846c223b262f71d8fcc83127..18f9ddd8a055873bbf7eecfff1ab5d2682081f33 100644 (file)
@@ -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;
         }