-
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
Wrong value of RequestDispatcher.FORWARD_CONTEXT_PATH
attribute on root context
#9123
Wrong value of RequestDispatcher.FORWARD_CONTEXT_PATH
attribute on root context
#9123
Conversation
* Fixes #9119 - uses proper context path that satisfies the root context rules of the servlet spec Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
@@ -878,35 +1003,56 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t | |||
} | |||
} | |||
|
|||
public static class AssertForwardServlet extends HttpServlet implements Servlet | |||
public static class DumpForwardServlet extends HttpServlet |
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.
I made this generic, so it can be used from different test case setups.
It's a better idea to assert values in the same thread the test is running in anyway.
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.
I'm trying to work out why the code was written that way in the first place? I can't see why as the request getContextPath also returns the encoded value???
Might be worthwhile to add a test of doing a forward from a cross context include.
@olamy can we run the TCK against this branch before merging?
jetty-server/src/main/java/org/eclipse/jetty/server/Dispatcher.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
I've approved changes, but let's keep issue open until TCK tests are double checked. |
@olamy can you test this branch with the TCK? |
all good regarding TCK build here https://jenkins.webtide.net/job/tck/job/servlettck-run-jetty-10.0.x/2044/ |
Signed-off-by: Joakim Erdfelt joakim.erdfelt@gmail.com