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

Request with Content-Length instead of Transfer-Encoding chunked #1441

Open
wants to merge 1 commit into
base: release-branch.v7
Choose a base branch
from

Conversation

olivier4576
Copy link

Request with Content-Length instead of Transfer-Encoding chunked

@chrisharrisonkiwi
Copy link

chrisharrisonkiwi commented Dec 18, 2020

Oh my gosh, I'm so glad this is coming.
So many headaches over Docker when it tries to hit an ElasticSearch instance using TransferEncoding: Chunked.

@olivere
Copy link
Owner

olivere commented Dec 18, 2020

@chrisharrisonkiwi I'm always interested in the kinds of problems people face out there: What kind of problem do you see with chunked encoding?

@chrisharrisonkiwi
Copy link

chrisharrisonkiwi commented Dec 20, 2020

@chrisharrisonkiwi I'm always interested in the kinds of problems people face out there: What kind of problem do you see with chunked encoding?

Mostly local development issues using ElasticSearch with "localstack".
Detail: I've been using Wireshark to capture requests from within docker containers made by this library and noticed the transfer encoding approach being used.
If I replay the request from within Docker and replace the chunked encoding for a Content-Length it seems to have a lot more luck networking between local services for some reason.

Attempting: "Transfer-Encoding: chunked" in a localstack Docker environment results in:
<!doctype html>
<title>408 Request Timeout</title>
<h1>Request Timeout</h1>
Request timed out; try again later

It could be unrelated, but it certainly seems to help.

@olivier4576
Copy link
Author

Resolves issue #1526

olivere added a commit that referenced this pull request Jan 7, 2022
This commit experiments with different encodings for the HTTP request
body.

See #1526
See #1441 (PR)
Request with ContentLength instead of Transfer-Encoding chunked
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 this pull request may close these issues.

None yet

3 participants