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

DefaultServlet not working with named dispatch in Jetty-12 EE10. #10139

Closed
lachlan-roberts opened this issue Jul 25, 2023 · 1 comment · Fixed by #10140
Closed

DefaultServlet not working with named dispatch in Jetty-12 EE10. #10139

lachlan-roberts opened this issue Jul 25, 2023 · 1 comment · Fixed by #10140
Labels
Bug For general bugs on Jetty side

Comments

@lachlan-roberts
Copy link
Contributor

Discovered from investigations into #10138.

This seems to have been introduced in the various PRs to fix #9910.

If there is a named dispatch then DefaultServlet#getEncodedPathInContext ignores the servletPath of the request because isDefaultMapping(HttpServletRequest req) incorrectly says that the default servlet is not at the default mapping.

In the case of the websocket ee10 demo this results in the wrong index.html file being served.

@lachlan-roberts lachlan-roberts added the Bug For general bugs on Jetty side label Jul 25, 2023
@lachlan-roberts lachlan-roberts changed the title DefaultServlet not working with named dispatch in Jetty-12. DefaultServlet not working with named dispatch in Jetty-12 EE10. Jul 25, 2023
lachlan-roberts added a commit that referenced this issue Jul 25, 2023
@joakime joakime moved this to 👀 In review in Jetty 12.0.1 - FROZEN Jul 25, 2023
@joakime joakime moved this from 👀 In review to 🏗 In progress in Jetty 12.0.1 - FROZEN Jul 25, 2023
joakime added a commit that referenced this issue Jul 25, 2023
gregw pushed a commit that referenced this issue Jul 26, 2023
…y-12 EE10 (#10140)

* Issue #10139 - check dispatch type and servlet name in DefaultServlet.isDefaultMapping

Signed-off-by: Lachlan Roberts <[email protected]>

* Issue #10139 - Two new test cases for INCLUDE/FORWARD to "default" named DefaultServlet

---------

Signed-off-by: Lachlan Roberts <[email protected]>
Co-authored-by: Joakim Erdfelt <[email protected]>
@joakime
Copy link
Contributor

joakime commented Aug 23, 2023

Merged PR #10140

@joakime joakime closed this as completed Aug 23, 2023
@joakime joakime moved this from 🏗 In progress to ✅ Done in Jetty 12.0.1 - FROZEN Aug 23, 2023
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 a pull request may close this issue.

2 participants