-
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
Fixes #8858 - Jetty 12 Review MovedContextHandler. #8859
Conversation
Updated method names to avod references to Servlet concepts. Added test cases. Updated XML files. Signed-off-by: Simone Bordet <[email protected]>
There was a problem hiding this 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...
String cacheControl = getCacheControl(); | ||
if (cacheControl != null) | ||
response.getHeaders().put(HttpHeader.CACHE_CONTROL, cacheControl); |
There was a problem hiding this comment.
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]>
There was a problem hiding this 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; |
There was a problem hiding this comment.
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]>
Updated method names to avoid references to Servlet concepts. Added test cases.
Updated XML files.
Signed-off-by: Simone Bordet [email protected]