You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From what I've read about multipart uploads. Either a Content-Length or a Transfer-Encoding header must be specified. OkHttp seems to be doing some compression behind the scenes and strips the Content-Length header of a multipart POST request in favor of Transfer-Encoding: chunked.
Is there a way to disable that transparent compression so I can reliably add a content-length header?
Why? I'm uploading to to Amazon S3 and they don't seem to support Transfer-Encoding: chunked.
The text was updated successfully, but these errors were encountered:
OkHttp needs to know the size of the file ahead of time or else it's will send it in chunks. Overriding the contentlength() method in the RequestBody provides that information to OkHttp and it add that information to the header.
From what I've read about multipart uploads. Either a
Content-Length
or aTransfer-Encoding
header must be specified. OkHttp seems to be doing some compression behind the scenes and strips theContent-Length
header of a multipart POST request in favor ofTransfer-Encoding: chunked
.Is there a way to disable that transparent compression so I can reliably add a
content-length
header?Why? I'm uploading to to Amazon S3 and they don't seem to support
Transfer-Encoding: chunked
.The text was updated successfully, but these errors were encountered: