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

Ensure Content-Length header instead of TE: chunked #163

Closed
malud opened this issue Mar 29, 2021 · 1 comment · Fixed by #237
Closed

Ensure Content-Length header instead of TE: chunked #163

malud opened this issue Mar 29, 2021 · 1 comment · Fixed by #237
Milestone

Comments

@malud
Copy link
Collaborator

malud commented Mar 29, 2021

Since we know the length of the given body bytes for each direction we should ensure sending the Content-Length header instead of sending those bytes with Transfer-Encoding: chunked.

Depends on the io.Reader. StringReader for example triggers an implicit set...

@malud malud added this to the 1.0 milestone Mar 29, 2021
@filex filex modified the milestones: 1.0, 1.x Mar 29, 2021
@filex
Copy link
Contributor

filex commented May 18, 2021

Sending T/E chunked also leads to problems with the oauth2 function when used to obtain a token from the MS Graph API (https://login.microsoftonline.com): The API responds with a 404 for the token endpoint. Seems like a content-length is mandatory.

we should at least switch to content-length for all (upstream) requests. because chunked encoding is rather unusual for uploads.

for responses, I wouldn't mind to use chunked encoding.

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

Successfully merging a pull request may close this issue.

2 participants