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

Some discrepancies in the handling of (non) keep-alive HTTP requests #1114

Merged

Conversation

bschev
Copy link
Contributor

@bschev bschev commented Aug 4, 2015

Documentation says:

Non keep-alive connections will be automatically closed by Vert.x when the response is ended.

This was only true for HTTP 1.0 requests, for non keep-alive / non persistent HTTP 1.1 requests (requests with Header "Connection: close") the connection was not closed.

When keep alive is enabled. Vert.x will add a Connection: Keep-Alive header to each HTTP request sent.

This header was not set for keep-alive HTTP 1.0 request, neither was the "Connection: close" header set for non keep-alive / non persistent HTTP 1.1 requests.

Things changed:

  • HTTP server response
    • A Request is considered keep-alive if either HTTP 1.1 and "Connection: close" header is not set or HTTP 1.0 and "Connection: keep-alive" header is set. This results in the closing of the undelying connection of non keep-alive requests also for non-persistent HTTP 1.1 requests.
    • for HTTP 1.0 keep-alive requests the "Connection: keep-alive" response header is set.
    • for HTTP 1.1 non keep-alive requests the "Connection: close" response header is set.
  • HTTP client request
    • for HTTP 1.0 keep-alive requests the "Connection: keep-alive" request header is set.
    • for HTTP 1.1 non keep-alive requests the "Connection: close" request header is set.
  • The protocol version is now configurable via the HttpClientOptions.

…quests.

Signed-off-by: Bernadette Schulze Everding <schulzeeverding@gmail.com>
@purplefox
Copy link
Contributor

Thanks!

purplefox added a commit that referenced this pull request Aug 18, 2015
Some discrepancies in the handling of (non) keep-alive HTTP requests
@purplefox purplefox merged commit 0163916 into eclipse-vertx:master Aug 18, 2015
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

2 participants