HTTP/2 uploads larger than 2^64 bytes aren't reliable #996

Closed
bagder opened this Issue Sep 6, 2016 · 2 comments

Projects

None yet

2 participants

@bagder
Member
bagder commented Sep 6, 2016

I did this

Send an upload to a server using HTTP/2 without the size set before-hand. (If the size is set, it is limited to 64bit.) due to the logic that still decreases the "upload left" counter even when the size is unknown, it may reach zero accidentally after 2^64 bytes have been transferred even if the transfer hasn't actually ended.

I expected the following

curl should allow the upload stream to go on forever.

curl/libcurl version

all

operating system

all

Note: I have a patch in progress for this already, but I'm holding it off until after the pending release to give it more time to mature.

@jay
Member
jay commented Sep 6, 2016

I'm sure you're technically correct but are you saying there's a use case for over 16 exabytes? When I've touched http2.c I've never accounted for that...

@bagder
Member
bagder commented Sep 6, 2016

Maybe, maybe not. It just struck me that the solution I went with has this limitation and it is easy to fix so I figured it is still worth it. I can imagine use cases where you for example stream video or something in a virtually never-ending stream.

@bagder bagder added a commit that closed this issue Sep 9, 2016
@bagder bagder 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
85033bc
@bagder bagder closed this in 85033bc Sep 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment