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

In http.js, do not end request for keep-alive connections #600

Merged
merged 1 commit into from
Mar 26, 2015

Conversation

mgorczyca
Copy link
Contributor

The request.end(data) line was preempting maintaining a persistent connection, even when Connection: 'keep-alive' was specified. My proposal is to handle the data via the body option, and only end the request when keep-alive is not specified.

@herom
Copy link
Contributor

herom commented Mar 16, 2015

Thanks a lot for your contribution @mgorczyca - we appreciate it a lot 👍

The TravisCI Build is failing due to failing tests in node v0.12 and io.js - in order to test it with your local repo it would be necessary to use nvm (at least I guess that there is no other/better solution) and install node v0.12 as well as io.js and run npm test in these environments too.

@mgorczyca
Copy link
Contributor Author

The build for v0.8.28 is failing with the following:

Error: Cannot find module 'readable-stream/duplex'

The npm test completes successfully in my nvm environment for the same node.js version. I'd appreciate any suggestion or solution.

@herom
Copy link
Contributor

herom commented Mar 24, 2015

Sorry for the late reply - I restarted the Travis CI tests and everything is passing (sometimes Travis CI seems to have some hickups while running tests).

Please, in order to get your PR merged in quickly, follow the steps lined out in our Guideline on Submitting a Pull Request. The points which are left to merge your PR are the following:

  • Please, squash your commits into a single one. If you don't know how to do this there are links to the excellent GitHub help on this topic in our Guidelines.
  • Please, please, please * do not close a pull request due to a request to rebase* (instead, read through our short r Guidelines and find all necessary information & help in order to squash/rebase your commits 👍

The request.end(data) line was preempting maintaining a persistent connection, even when Connection: 'keep-alive' was specified. My proposal is to handle the data via the body option, and only end the request when keep-alive is not specified.
@mgorczyca
Copy link
Contributor Author

Thanks for the helpful information and links!

herom added a commit that referenced this pull request Mar 26, 2015
In http.js, do not end request for keep-alive connections
@herom herom merged commit f04d1d5 into vpulim:master Mar 26, 2015
@herom
Copy link
Contributor

herom commented Mar 26, 2015

Thanks a lot 👍

diarmaidm pushed a commit to diarmaidm/node-soap that referenced this pull request Feb 3, 2016
In http.js, do not end request for keep-alive connections
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.

3 participants