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

Issue #10463 Fix lastModified header when using HttpServletResponseWrapper #10556

Merged
merged 2 commits into from
Sep 21, 2023

Conversation

janbartel
Copy link
Contributor

Fixes #10463

@@ -1402,7 +1402,7 @@ else if (contentLength > NO_CONTENT_LENGTH)

public static void putHeaders(HttpServletResponse response, HttpContent content, long contentLength, boolean etag)
{
long lml = content.getLastModified().getLongValue();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bug seems to be in HttpContent.getLastModified(), why not fix it there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bug isn't in HttpContent.getLastModified(), which is a HttpField representing a stringified Date value. If you look at the same code in jetty-10/11 etc, this is how we handle this case. See https://github.com/eclipse/jetty.project/blob/jetty-10.0.x/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java#L1450

@janbartel janbartel requested a review from joakime September 20, 2023 21:04
@janbartel janbartel merged commit 9bfa5cc into jetty-12.0.x Sep 21, 2023
@janbartel janbartel deleted the jetty-12.0.x-10463-lastmodified branch September 21, 2023 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants