diff options
author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-01-30 17:49:35 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-01-30 17:49:35 +0100 |
commit | c5165b84589a9bbf3567fde19add3819fd71e1b2 (patch) | |
tree | c88a343ff5ba5579828c07ec8bed1d1bfc5e9b50 | |
parent | 88705ef80efcb5ee3ef75aea6f037f56f7e6dda1 (diff) |
http2_recv: Return written length on CURLE_AGAIN
-rw-r--r-- | lib/http2.c | 7 |
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"); |