-
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
All suffix globs except first fail to match if path has .
character in prefix section
#8184
Labels
Comments
This is an ugly bug. |
joakime
added a commit
that referenced
this issue
Jun 21, 2022
…pattern Signed-off-by: Joakim Erdfelt <[email protected]>
joakime
added a commit
that referenced
this issue
Jun 21, 2022
…pattern Cherry-pick of commit d1ecdf6 Signed-off-by: Joakim Erdfelt <[email protected]>
Opened 2 PRs (for |
We'll be spinning a new release once these are green. |
joakime
added a commit
that referenced
this issue
Jun 21, 2022
…pattern (#8186) Cherry-pick of commit d1ecdf6 Signed-off-by: Joakim Erdfelt <[email protected]>
joakime
added a commit
that referenced
this issue
Jun 21, 2022
…pattern (#8185) Signed-off-by: Joakim Erdfelt <[email protected]>
joakime
changed the title
All suffix globs except first fail to match if path has . character in prefix in Jetty 11.0.10
All suffix globs except first fail to match if path has Jun 21, 2022
.
character in prefix section
@markslater Jetty 9.4.48.v20220622 has this fix (btw) |
Using it successfully in 11.0.11 :) Thanks for the fast turnaround! |
@markslater looks like another suffix bug snuck through in Jetty 9.4.48 as well. #8396 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jetty version(s)
11.0.10
Java version/vendor
(use: java -version)
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1)
OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1, mixed mode, sharing)
OS type/version
Linux 5.4.0-120-generic
Description
In Jetty 11.0.9, the path spec
*.foo
matches all paths that end.foo
, such asbar.foo
andbar.baz.foo
. In Jetty 11.0.10, if more than one suffix glob path spec is defined, that path spec won't matchbar.baz.foo
becauseorg.eclipse.jetty.http.pathmap.PathMappings
attempts to match suffix globs from the first instance of.
in the path, and then terminates early.How to reproduce?
Given the following class:
Using Jetty 11.0.9, http://localhost:8080/bar.baz.foo returns a 200, but using Jetty 11.0.10, it returns a 404 (both handle http://localhost:8080/bar.foo successfully, as expected).
Note that the line
servletContextHandler.addServlet(new ServletHolder(new FooServlet()), "*.bar");
is critical to reproducing the failure because the (alphabetically?) first suffix glob ends up being rechecked onPathMappings#243
Also note that it's possible that 11.0.10 is more correct than 11.0.9. I couldn't find in the Servlet Spec whether
*.foo
is expected to matchbar.baz.foo
or not, but intuitively I'd expect it would.The text was updated successfully, but these errors were encountered: