-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Resteasy vs Resteasy Reactive: Inconsistent behavior in path resolution when there's a trailing slash at the path #26016
Comments
/cc @FroMage, @geoand, @stuartwdouglas |
I am not sure what the proper handling is here... My feeling is that RESTEasy Reactive does the right thing. WDYT @stuartwdouglas ? |
Having googled for a bit, it sure looks like most people consider "/resource/" and "/resource" to be two different things. Looks like it's been this way since 1.0 too, someone on StackOverflow pointed out this exact thing in 2013 as well: https://stackoverflow.com/a/15215730 |
RESTEasy Classic already behaves properly, so we should follow this patterns Fixes: quarkusio#26016
Indeed point 4 seems pretty unambiguous (although I am surprised the TCK does not test it...) In any case, #26101 takes care of it |
RESTEasy Classic already behaves properly, so we should follow this patterns Fixes: quarkusio#26016
Make RESTEasy Reactive path matching more spec compliant
Describe the bug
Given the following resource (notice the trailing
/
after/world
):Using
quarkus-resteasy
:curl -X GET -i http://localhost:8080/hello/world => returns 200 OK
curl -X GET -i http://localhost:8080/hello/world/ => returns 200 OK (notice the extra / at the end)
Using
quarkus-resteasy-reactive
:curl -X GET -i http://localhost:8080/hello/world => returns 404 NOT FOUND
curl -X GET -i http://localhost:8080/hello/world/ => returns 200 OK (notice the extra / at the end)
Expected behavior
Behavior should be consistent Either both of them return 200 for the request without the trailing slash, or both of them return 404.
Actual behavior
Resteasy returns 200 for requests made with and without the trailing slash.
Resteasy Reactive returns 404 for the request made with no trailing slash and 200 when there's a trailing slash.
How to Reproduce?
quarkus-resteasy
to one of them andquarkus-resteasy-reactive
to the otherOutput of
uname -a
orver
Microsoft Windows [version 10.0.19043.1706]
Output of
java -version
java version "17" 2021-09-14 LTS Java(TM) SE Runtime Environment (build 17+35-LTS-2724) Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.9.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d) Maven home: D:\apache-maven-3.8.1\bin.. Java version: 1.8.0_301, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_301\jre Default locale: pt_BR, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Additional information
No response
The text was updated successfully, but these errors were encountered: