-
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
301 Moved Permanently produces query with ;
instead of ?
#10794
Comments
A context path of Eg: You could also have a root context at This is why the Servlet spec auto redirects a context of |
In our case we have no ressources in the root context, so every "/xyz" should be its own context. The redirect from "/blah" to "/blah/" is fine, but the redirect from "/blah?q=test" to "/blah/;q=test" is not. |
Steps to replicate this issue. Download the Jetty Home tarball
Setup the Jetty Base with ee8 demos
Run Jetty
Test behavior of GET to resource served by DefaultServlet with query param.
Behavior Confirmed! Test scope of issueLets see if this is true in ee9 / ee10 too. (with the ee9-demos and ee10-demos enabled as well) Yup, present on EE9 as well.
Yup, present on EE10 as well.
|
Opened PR #10796 to fix this |
…ith-query Issue #10794 - fixing Moved Permanently handling of query strings
Merged PR #10796 into |
;
instead of ?
Jetty Version 12.0.2
Jetty Environment ee8
Java Version 17
Question
Hi,
we used a ServletContextHandler to map the context path "foo" to static ressources with DefaultServlet.class
Before we used Jetty 10 and the URL "localhost/foo?q=bar" worked as expected.
Now with Jetty 12 the same URL is redirected to "localhost/foo/;q=bar" with http code 301 ...
If we use "localhost/foo/?q=bar" it worked correctly ...
Does anyone know whats going on with "?" and "/?" ?
with best regards
The text was updated successfully, but these errors were encountered: