Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multipart requests always result in Transfer-encoding: chunked #55

Open
p-himik opened this issue May 9, 2023 · 0 comments
Open

Multipart requests always result in Transfer-encoding: chunked #55

p-himik opened this issue May 9, 2023 · 0 comments

Comments

@p-himik
Copy link

p-himik commented May 9, 2023

Hato converts the multipart parameters into a stream, which makes HttpClient to unconditionally use an InputStreamPublisher, which doesn't set content length, which results in a chunked request.

That can be problematic because e.g. Trello doesn't support it - its API returns HTTP 411 if a request doesn't have content length (and chunked requests can't have content length).

vincentjames501 pushed a commit to vincentjames501/hato that referenced this issue May 19, 2023
…the multipart body (where appropriate)

- This introduces a new protocol called MultipartParam which can be extended to support additional
content types. By default we're matching essentially what io/input-stream does by default to
minimize any backwards incompatible changes here
- When we know the content-length of the multipart body, supply it to the HttpClient
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant