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

Reactive REST endpoints do not handle trailing slashes for paths w/ regex #42687

Closed
autumnfound opened this issue Aug 21, 2024 · 1 comment · Fixed by #43016
Closed

Reactive REST endpoints do not handle trailing slashes for paths w/ regex #42687

autumnfound opened this issue Aug 21, 2024 · 1 comment · Fixed by #43016
Labels
kind/bug Something isn't working
Milestone

Comments

@autumnfound
Copy link

Describe the bug

When attempting to navigate to endpoints that use regex within the path expression (i.e. @Path("{somePath:[a-z]{2}}")), trailing slashes do not properly route to the resource and instead return an error that the path cannot be matched. This impacts any paths that contain regex, not just those ending with regex.

This impacts the Reactive REST quarkus-resteasy-reactive package in 3.8, and in quick testing this also impacts the current 3.13.3 release quarkus-rest package as well.

This seems to be a regression/missed aspect for the fix associated with #26016.

Expected behavior

In cases where there are regex expressions within the @Path value, adding trailing slashes to the endpoint should route to the same endpoint.

Actual behavior

When a trailing slash is present for endpoints that contain a regex in the path, the endpoint doesn't properly route.

How to Reproduce?

Using reproducer project:

  1. With server started, open the following URLs in browser to confirm that endpoints do properly exist + route:
  1. In browser, open the following links to observe behaviour with trailing slashes

All 3 URLs in step 2 should pass, but only the first link does

Output of uname -a or ver

Linux pop-os 6.9.3-76060903-generic #202405300957172117465722.04~abb7c06 SMP PREEMPT_DYNAMIC Wed J x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "17.0.11" 2024-04-16 OpenJDK Runtime Environment Temurin-17.0.11+9 (build 17.0.11+9) OpenJDK 64-Bit Server VM Temurin-17.0.11+9 (build 17.0.11+9, mixed mode, sharing)

Quarkus version or git rev

3.8.5

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae) Maven home: /home//bin/apache-maven-3.9.6 Java version: 17.0.11, vendor: Eclipse Adoptium, runtime: /home//bin/mandrel-java17-23.0.4.1-Final Default locale: en_CA, platform encoding: UTF-8 OS name: "linux", version: "6.9.3-76060903-generic", arch: "amd64", family: "unix"

Additional information

No response

@autumnfound autumnfound added the kind/bug Something isn't working label Aug 21, 2024
Copy link

quarkus-bot bot commented Aug 21, 2024

/cc @Karm (mandrel), @galderz (mandrel), @zakkak (mandrel)

jonomorris added a commit to jonomorris/quarkus that referenced this issue Sep 4, 2024
jonomorris added a commit to jonomorris/quarkus that referenced this issue Sep 4, 2024
jonomorris added a commit to jonomorris/quarkus that referenced this issue Sep 6, 2024
jonomorris added a commit to jonomorris/quarkus that referenced this issue Nov 7, 2024
jonomorris added a commit to jonomorris/quarkus that referenced this issue Nov 7, 2024
jonomorris added a commit to jonomorris/quarkus that referenced this issue Nov 7, 2024
@quarkus-bot quarkus-bot bot added this to the 3.17 - main milestone Nov 12, 2024
bschuhmann pushed a commit to bschuhmann/quarkus that referenced this issue Nov 16, 2024
bschuhmann pushed a commit to bschuhmann/quarkus that referenced this issue Nov 16, 2024
bschuhmann pushed a commit to bschuhmann/quarkus that referenced this issue Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants