Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Always close the connection at the end of a request. #17

Merged
merged 3 commits into from Apr 15, 2014

Conversation

jgraham
Copy link
Member

@jgraham jgraham commented Apr 14, 2014

Since changing the HTTP version to 1.1, the connection would use
keepalive. This is fine in most cases, but some responses don't
know how long they are and so don't set Content-Length. This meant
that the associated request would time out. Closing the connection
fixes this issue. If we need keepalive e.g. to test browser behaviour
in this area then we can revisit this fix with something more
surgical.

Since changing the HTTP version to 1.1, the connection would use
keepalive. This is fine in most cases, but some responses don't
know how long they are and so don't set Content-Length. This meant
that the associated request would time out. Closing the connection
fixes this issue. If we need keepalive e.g. to test browser behaviour
in this area then we can revisit this fix with something more
surgical.
@hoppipolla-critic-bot
Copy link

Critic review: https://critic.hoppipolla.co.uk/r/1249

This is an external review system which you may optionally use for the code review of your pull request.

In order to help critic track your changes, please do not make in-place history rewrites (e.g. via git rebase -i or git commit --amend) when updating this pull request.

jgraham added a commit that referenced this pull request Apr 15, 2014
Always close the connection at the end of a request.
@jgraham jgraham merged commit d73b6cd into master Apr 15, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants