b2-sdk-python icon indicating copy to clipboard operation
b2-sdk-python copied to clipboard

the uploader does not check for maximum number of custom header fields

Open sobczyk opened this issue 5 years ago • 2 comments

when one passes a dict to file_info it is not checked whether too many entries fields are present.

Cryptic error is thrown, ie:

FAILED to upload after 5 tries. Encountered exceptions: Broken pipe: unable to send entire request

sobczyk avatar May 19 '20 15:05 sobczyk

We will implement an extension to b2sdk soon, that will allow for better and faster error reporting on upload attempts.

ppolewicz avatar May 19 '20 15:05 ppolewicz

Unfortunately we cannot implement yet due to urllib3 and requests not supporting Expect: 100 continue headers. We are considering switching to pycurl, but not as soon we've hoped.

I'd rather do this and let the server perform the verification, than implement the verification on the side of b2sdk - if one day limits are changed, b2sdk would not validate the input correctly. On the other hand, we can trust the server to do it well.

ppolewicz avatar May 29 '20 01:05 ppolewicz