Closed viperadnan-git closed 1 year ago
This works in very few use cases and thus is not something we will support. Anyone that would attempt to use this with a URL they've requested that does not have a Content-Length
will result in an invalid request. The content-length will be wrong and way too short as demonstrated by you defaulting the retrieval of the header to 0.
As a result, we will not be merging this.
Thank you for explanation. I will try to cover all the edge cases.
You don't need to. This functionality already exists although it seems whomever added it didn't add it to the documentation: https://github.com/requests/toolbelt/blob/c5ac5f3b5c7ed599703e0deb4fd31ce7998711ed/requests_toolbelt/multipart/encoder.py#L579
Thank you for your response, this is exactly what I needed.
On Mon, 21 Aug 2023, 12:37 am Ian Stapleton Cordasco, < @.***> wrote:
You don't need to. This functionality already exists although it seems whomever added it didn't add it to the documentation: https://github.com/requests/toolbelt/blob/c5ac5f3b5c7ed599703e0deb4fd31ce7998711ed/requests_toolbelt/multipart/encoder.py#L579
— Reply to this email directly, view it on GitHub https://github.com/requests/toolbelt/pull/369#issuecomment-1685367798, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONR54V2CXKRZSYI2WKSQW3XWJN57ANCNFSM6AAAAAA3XFJ6HQ . You are receiving this because you authored the thread.Message ID: @.***>
Added content length for HTTPResponse in MultipartEncoder to support posting multipart data from streaming response.
Use case:
Tested with multiple URLs Example URLs: Download URL: https://mirror.nforce.com/pub/speedtests/10mb.bin Upload URL: https://file.io