aboutsummaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-09-06 23:12:12 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-09-09 15:41:39 +0200
commit85033bcfccc826047bc4f847ecc0c21c2a9415fe (patch)
tree20a7b5214b697eaee2ecd45dc217380afefa5a6c /lib/http2.c
parentaf2d679e1414369f23a2d37a113634b0ac7f38b0 (diff)
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
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c3
1 files changed, 2 insertions, 1 deletions
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)