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

HttpServer not compliant to HTTP 1.0 requests #126

Closed
NiteshKant opened this issue May 23, 2014 · 0 comments
Closed

HttpServer not compliant to HTTP 1.0 requests #126

NiteshKant opened this issue May 23, 2014 · 0 comments
Labels
Milestone

Comments

@NiteshKant
Copy link
Member

There are multiple issues with the current HttpServer implementation.

  • According to RFC 2145 a server should return the maximum compatible HTTP minor version (which in our case will be 1.1) for any request 1.0 or 1.1. Instead currently, the server sends a 1.0 response for 1.0 requests.
  • The server does not send a "Connection" header with value as "keep-alive" for client requested Keep-Alive and "Close" with no keep-alive requests. (HTTP spec reference)
  • Even if the transfer encoding is not chunked, the server sends a last http content.
  • The transfer encoding chunked is set only for keep-alive connections even though the response is always sent as chunked.
@NiteshKant NiteshKant added this to the 0.3.6 milestone May 23, 2014
@NiteshKant NiteshKant self-assigned this May 23, 2014
@NiteshKant NiteshKant added the bug label May 23, 2014
NiteshKant pushed a commit to NiteshKant/RxNetty that referenced this issue May 26, 2014
HttpServer now handles HTTP 1.0 requests as per the spec.
NiteshKant pushed a commit to NiteshKant/RxNetty that referenced this issue May 28, 2014
HttpServerResponse.close() was asserting the transfer encoding to add LastHttpContent.
The transfer encoding was getting added in ServerRequestResponseConverter.
In cases, when close() is NOT invoked from the eventloop of the server, there is a race-condition
between when the transfer encoding is updated (in the handler) and when close() asserts the same as
the handler is invoked in a different thread (server eventloop) than close()

Also added some testcases for this scneario.

Bug fix
NiteshKant added a commit that referenced this issue May 29, 2014
@NiteshKant NiteshKant modified the milestone: 0.3.6 May 31, 2014
@NiteshKant NiteshKant removed their assignment Aug 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant