From: Daniel Stenberg Date: Mon, 19 Apr 2021 11:13:47 +0000 (+0200) Subject: http2: call the handle-closed function correctly on closed stream X-Git-Tag: curl-7_77_0~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=252790c5335a221;p=thirdparty%2Fcurl.git http2: call the handle-closed function correctly on closed stream This was this one condition where the stream could be closed due to an error and the function would still wrongly just return 0 for it. Reported-by: Gergely Nagy Fixes #6862 Closes #6910 --- diff --git a/lib/http2.c b/lib/http2.c index ce9a0d393c..8ceea3681b 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -1609,6 +1609,10 @@ static ssize_t http2_recv(struct Curl_easy *data, int sockindex, return -1; } + if(stream->closed) + /* closed overrides paused */ + return http2_handle_stream_close(conn, data, stream, err); + /* Nullify here because we call nghttp2_session_send() and they might refer to the old buffer. */ stream->upload_mem = NULL;