-
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
add SizeLimitHandler to Jetty-12 #10071
Conversation
Signed-off-by: Lachlan Roberts <[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.
This looks good, but can you also add a test where this is put inside an ee10 ServletContextHandler
, perhaps with a GzipHandler
also in the context. It is not needed to test this handler, but I want to make sure we test the ability to nest core handlers inside ee10 contexts. We probably also need to work out simple methods to configure/deploy
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[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.
almost! one more thing!
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException | ||
{ | ||
String requestContent = IO.toString(req.getInputStream()); | ||
resp.getWriter().print(requestContent); |
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.
It would be good to test both if the size limit is broken incrementally and if it is broken by an initial large write.
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.
We do have this test, but not in the servlet version of the test using GZIP.
It is in SizeLimitHandlerTest
.
adapt the
SizeLimitHandler
from jetty 9.4 to the Jetty 12 core Handler style