From 85033bcfccc826047bc4f847ecc0c21c2a9415fe Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 6 Sep 2016 23:12:12 +0200 Subject: [PATCH] http2: support > 64bit sized uploads ... by making sure we don't count down the "upload left" counter when the uploaded size is unknown and then it can be allowed to continue forever. Fixes #996 --- lib/http2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/http2.c b/lib/http2.c index a66b8f74c..c2257726a 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -945,7 +945,8 @@ static ssize_t data_source_read_callback(nghttp2_session *session, memcpy(buf, stream->upload_mem, nread); stream->upload_mem += nread; stream->upload_len -= nread; - stream->upload_left -= nread; + if(data_s->state.infilesize != -1) + stream->upload_left -= nread; } if(stream->upload_left == 0)