]> granicus.if.org Git - curl/commitdiff
http2: expire a timeout at end of stream
authorDaniel Stenberg <daniel@haxx.se>
Thu, 17 Oct 2019 12:25:45 +0000 (14:25 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 18 Oct 2019 21:23:43 +0000 (23:23 +0200)
To make sure that transfer is being dealt with. Streams without
Content-Length need a final read to notice the end-of-stream state.

Reported-by: Tom van der Woerdt
Fixes #4496

lib/http2.c

index b5b831b56a7cad36b4b7080679cb4514dba6cacd..c0f29f83e8f0587da9ecdd4433a20f563dc6d547 100644 (file)
@@ -848,6 +848,7 @@ static int on_stream_close(nghttp2_session *session, int32_t stream_id,
     stream->closed = TRUE;
     httpc = &conn->proto.httpc;
     drain_this(data_s, httpc);
+    Curl_expire(data_s, 0, EXPIRE_RUN_NOW);
     httpc->error_code = error_code;
 
     /* remove the entry from the hash as the stream is now gone */