Skip to content
Commit 979d2877 authored by Jay Satiro's avatar Jay Satiro
Browse files

transfer: Fix chunked-encoding upload bug

- When uploading via chunked-encoding don't compare file size to bytes
  sent to determine whether the upload has finished.

Chunked-encoding adds its own overhead which why the bytes sent is not
equal to the file size. Prior to this change if a file was uploaded in
chunked-encoding and its size was known it was possible that the upload
could end prematurely without sending the final few chunks. That would
result in a server hang waiting for the remaining data, likely followed
by a disconnect.

The scope of this bug is limited to some arbitrary file sizes which have
not been determined. One size that triggers the bug is 475020.

Bug: https://github.com/curl/curl/issues/2001


Reported-by: default avatar <moohoorama@users.noreply.github.com>

Closes https://github.com/curl/curl/pull/2010
parent 788d3335
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment