summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-04-19 13:13:47 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-04-21 08:20:24 +0200
commit252790c5335a221179dfbacb40e065750bbe7544 (patch)
tree98c6173486f89b794f20af661232eff3473a8865
parent6b97f1311a1454c83ca04665a9eec2673643fd1d (diff)
downloadcurl-252790c5335a221179dfbacb40e065750bbe7544.tar.gz
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
-rw-r--r--lib/http2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/http2.c b/lib/http2.c
index ce9a0d393..8ceea3681 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;