-
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
Servlet HEAD doesn't support content-length over Integer.MAX_VALUE #5214
Comments
Can your server serve that resource if it is a GET request? Does it return with a content-length or chunked or connection:close ? |
It works when doing a GET with the Content-Length being correct. GET REQUEST Response Headers ============================ HEAD REQUEST Response Headers ============================ |
Just tested this on Linux. It fails on Linux as well. for 4GB and 10GB files from DefaultServlet. (See commit 1168713) |
Signed-off-by: Joakim Erdfelt <[email protected]>
This is a bug in the servlet-api layer. When the HEAD request arrives to @gregw the branch Do we want to fork/fix the servlet-api? |
+ In the case of HEAD, the servlet-api response is a wrapper of javax.servlet.http.HttpServlet$NoBodyResponse We know the content_length, use it. Signed-off-by: Joakim Erdfelt <[email protected]>
Opened PR #5215 |
+ Adding DefaultServlet.doHead() to avoid servlet wrapping + Making ResourceService HEAD aware Signed-off-by: Joakim Erdfelt <[email protected]>
tested with PR for jetty-9.4.x-5214-head-huge-static and it works! |
@ebremer great news! thanks for the feedback. |
Issue #5214 - Servlet HEAD doesn't support content-length over Integer.MAX_VALUE
PR #5215 merged. |
9.4.31.v20200723
(build 11.0.8+10-jvmci-20.2-b03
Windows 10
When doing a HEAD request to retrieve file size using Jetty, anything one byte or more over 2^31 returns Content-Length: 0.
The text was updated successfully, but these errors were encountered: