-
Notifications
You must be signed in to change notification settings - Fork 1.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
Jetty 12.0 Handle HEAD requests in Handler #9953
Labels
Bug
For general bugs on Jetty side
Comments
Typically the container ignores content written, so you don't need to explicitly handle head like this servlet does. However, I'll look to see if we can avoid that length written check for head methods when only 0 bytes have been written... stand by... |
gregw
added a commit
that referenced
this issue
Jun 23, 2023
Fix #9953 so that if a Handler self handles HEAD by not writing content, then the length checks do not fire if 0 bytes have been written.
Merged
Merged
See PR #9957 This is not actually related to Aysnc, but to any handler that self handles HEAD. |
gregw
added a commit
that referenced
this issue
Jun 23, 2023
Merged in PR #9957 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I work on the Spring Framework, where we are in the process of upgrading to Jetty 12 as part of our 6.1 branch. As part of this migration, I have run into an issue.
This issue occurs when an asynchronous
WriteListener
does not write the amount of bytes specified inContent-Length
. This is fine for typical requests, but not forHEAD
requests, given Section 14.13 of RFC 2616:The following Servlet can be used to reproduce this issue:
Running this servlet on Jetty 12.0 beta 2 results in the following exception in
HttpChannelState
:Jetty version(s)
Jetty 12.0 beta2
Java version/vendor
(use: java -version)
openjdk version "17.0.7" 2023-04-18 LTS
The text was updated successfully, but these errors were encountered: