aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/http2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 214b46961..019518514 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -372,8 +372,11 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
rc = Curl_read_plain(conn->sock[FIRSTSOCKET], inbuf, H2_BUFSIZE, &nread);
if(rc == CURLE_AGAIN) {
- *err = rc;
- return -1;
+ if(len == conn->proto.httpc.len) {
+ *err = rc;
+ return 0;
+ }
+ return len - conn->proto.httpc.len;
}
if(rc) {
failf(conn->data, "Failed receiving HTTP2 data");