-
-
Notifications
You must be signed in to change notification settings - Fork 15.9k
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
HttpServerKeepAliveHandler closes connection on 204 response #6549
Labels
Comments
Scottmitch
added a commit
to Scottmitch/netty
that referenced
this issue
Mar 30, 2017
… keepalive Motivation: https://tools.ietf.org/html/rfc7230#section-3.3.2 states that a 204 response MUST NOT include a Content-Length header. If the HTTP version permits keep alive these responses should be treated as keeping the connection alive even if there is no Content-Length header. Modifications: - HttpServerKeepAliveHandler#isSelfDefinedMessageLength should account for 204 respones Result: Fixes netty#6549.
see #6587 |
Scottmitch
added a commit
that referenced
this issue
Apr 1, 2017
… keepalive Motivation: https://tools.ietf.org/html/rfc7230#section-3.3.2 states that a 204 response MUST NOT include a Content-Length header. If the HTTP version permits keep alive these responses should be treated as keeping the connection alive even if there is no Content-Length header. Modifications: - HttpServerKeepAliveHandler#isSelfDefinedMessageLength should account for 204 respones Result: Fixes #6549.
liuzhengyang
pushed a commit
to liuzhengyang/netty
that referenced
this issue
Sep 10, 2017
… keepalive Motivation: https://tools.ietf.org/html/rfc7230#section-3.3.2 states that a 204 response MUST NOT include a Content-Length header. If the HTTP version permits keep alive these responses should be treated as keeping the connection alive even if there is no Content-Length header. Modifications: - HttpServerKeepAliveHandler#isSelfDefinedMessageLength should account for 204 respones Result: Fixes netty#6549.
kiril-me
pushed a commit
to kiril-me/netty
that referenced
this issue
Feb 28, 2018
… keepalive Motivation: https://tools.ietf.org/html/rfc7230#section-3.3.2 states that a 204 response MUST NOT include a Content-Length header. If the HTTP version permits keep alive these responses should be treated as keeping the connection alive even if there is no Content-Length header. Modifications: - HttpServerKeepAliveHandler#isSelfDefinedMessageLength should account for 204 respones Result: Fixes netty#6549.
pulllock
pushed a commit
to pulllock/netty
that referenced
this issue
Oct 19, 2023
… keepalive Motivation: https://tools.ietf.org/html/rfc7230#section-3.3.2 states that a 204 response MUST NOT include a Content-Length header. If the HTTP version permits keep alive these responses should be treated as keeping the connection alive even if there is no Content-Length header. Modifications: - HttpServerKeepAliveHandler#isSelfDefinedMessageLength should account for 204 respones Result: Fixes netty#6549.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
Netty Http Server responds 204 without body, maintaining the connection open.
Actual behavior
HttpServerKeepAliveHandler
closes the connection unless the response isInformational
or hasContent-Length
set, but 204 responses are not Informational but should not carry aContent-Length
header rfc.A condition regarding 204 responses should be added here.
Steps to reproduce
Create Http Server adding
https://github.com/netty/netty/blob/149916d052180dd2b0e0e98598f349454ea200ba/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerKeepAliveHandler.java#L115
Send a 204 response without body and
Content-Length
.The text was updated successfully, but these errors were encountered: