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

check for req.chunkedEncoding rather than req.useChunkedEncodingByDefault #16

Open
spalger opened this issue Feb 26, 2014 · 1 comment

Comments

@spalger
Copy link

spalger commented Feb 26, 2014

When investigating why connections were being created and destroyed constantly I noticed that forever-agent looks at the request's useChunkedEncodingByDefault property rather than it's chunkedEncoding property, which seems to actually say if the request is chunked or not. Is there a reason for this?

In this screenshot you can see:

  • there are 9 free sockets available
  • there are 10 total sockets open
  • the request is not chunkedEncoded
  • it still creates a new socket

screen-shot-2014-02-26-at-11 58 36-am

@spalger
Copy link
Author

spalger commented Mar 14, 2014

Did not realize that this method is called within http.request(). I think that means that I would have to set the content-length header in the call to http.request() in order to tell ForeverAgent that I will not be using chunked encoding, and it can therefore draw from the connection pool.

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