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

Fixes #8858 - Jetty 12 Review MovedContextHandler. #8859

Merged
merged 3 commits into from
Nov 3, 2022

Conversation

sbordet
Copy link
Contributor

@sbordet sbordet commented Nov 3, 2022

Updated method names to avoid references to Servlet concepts. Added test cases.
Updated XML files.

Signed-off-by: Simone Bordet [email protected]

Updated method names to avod references to Servlet concepts.
Added test cases.
Updated XML files.

Signed-off-by: Simone Bordet <[email protected]>
@sbordet sbordet requested a review from joakime November 3, 2022 00:19
@sbordet sbordet linked an issue Nov 3, 2022 that may be closed by this pull request
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

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

Other than a minor performance niggle...

Comment on lines 183 to 185
String cacheControl = getCacheControl();
if (cacheControl != null)
response.getHeaders().put(HttpHeader.CACHE_CONTROL, cacheControl);
Copy link
Contributor

Choose a reason for hiding this comment

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

If we wanted to optimise, then when the cache control is set, we could construct a PreEncodedHttpField and then put that rather than build a new HttpField on every request.

Signed-off-by: Simone Bordet <[email protected]>
Copy link
Contributor

@joakime joakime left a comment

Choose a reason for hiding this comment

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

Looks good, just want to see some javadoc telling folks about the default statuscode.

boolean _discardQuery;
boolean _permanent;
String _expires;
private int _statusCode = HttpStatus.SEE_OTHER_303;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should document this default value in the javadoc somewhere.

In getStatusCode() perhaps?

Signed-off-by: Simone Bordet <[email protected]>
@sbordet sbordet requested a review from joakime November 3, 2022 15:07
@sbordet sbordet merged commit 41e9842 into jetty-12.0.x Nov 3, 2022
@sbordet sbordet deleted the fix/jetty-12-review-movedcontexthandler branch November 3, 2022 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jetty 12 - Review MovedContextHandler
3 participants