If HTTP 1.1 is used and backend doesn't return 'Connection' header, expicitly return Connection: keep-alive. #298

Merged
merged 1 commit into from Mar 9, 2013

Conversation

Projects
None yet
3 participants
@Kami
Contributor

Kami commented Aug 17, 2012

Currently if a backend doesn't return Connection header, http-proxy sets it to Connetion: close regardless of the request HTTP version.

We should respect request HTTP version and if HTTP 1.1 is used, return Connection: keep-alive. *

  • Quoted from the RFC:
...
to indicate that the connection will be kept open for the next request. The Connection header field with a keep-alive keyword must be sent on all requests and responses that wish to continue the persistence. The client sends requests as normal and the server responds as normal, except that all messages containing an entity body must have a length that can be determined without closing the connection (i.e., each message containg an entity body must have a valid Content-Length, be a multipart media type, or be encoded using the "chunked" transfer coding, as described in Section 7.2.2).
...
@travisbot

This comment has been minimized.

Show comment Hide comment
@travisbot

travisbot Aug 17, 2012

This pull request passes (merged 850171c into 4f6387c).

This pull request passes (merged 850171c into 4f6387c).

@Kami

This comment has been minimized.

Show comment Hide comment
@Kami

Kami Dec 17, 2012

Contributor

bump ^^

Contributor

Kami commented Dec 17, 2012

bump ^^

@indexzero

This comment has been minimized.

Show comment Hide comment
@indexzero

indexzero Dec 19, 2012

Owner

Seems reasonable. We'll try to get this merged in soon. We try to perform maintenance in groups to make releases more stable, so apologies if it is not immediate.

Owner

indexzero commented Dec 19, 2012

Seems reasonable. We'll try to get this merged in soon. We try to perform maintenance in groups to make releases more stable, so apologies if it is not immediate.

@Kami

This comment has been minimized.

Show comment Hide comment
@Kami

Kami Dec 19, 2012

Contributor

OK, thanks for the heads up.

Contributor

Kami commented Dec 19, 2012

OK, thanks for the heads up.

indexzero added a commit that referenced this pull request Mar 9, 2013

Merge pull request #298 from Kami/connection_keep_alive_on_1_1
If HTTP 1.1 is used and backend doesn't return 'Connection' header, expicitly  return Connection: keep-alive.

@indexzero indexzero merged commit af9eb06 into nodejitsu:master Mar 9, 2013

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment