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

Misspelled url for an webjar resource thows exception instead of 404 #40991

Closed
rar91279 opened this issue Jun 5, 2024 · 1 comment · Fixed by #41018
Closed

Misspelled url for an webjar resource thows exception instead of 404 #40991

rar91279 opened this issue Jun 5, 2024 · 1 comment · Fixed by #41018
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@rar91279
Copy link

rar91279 commented Jun 5, 2024

Describe the bug

trying to play with jquery web jar and latest (3.11) Quarkus.
By request with proper URL (proto://host:port/webjars/jquery/jquery.js), the requested file will be delivered
Misspelling of Url to jquery.js (proto://host:port/webjars/jquery.js), for example, will be responded with java.lang.StringIndexOutOfBoundsException

Expected behavior

Response with 404 - Resource not found

Actual behavior

java.lang.StringIndexOutOfBoundsException will be thrown

How to Reproduce?

  1. Checkout project https://github.com/rar91279/webjar_resource
  2. Start
  3. Request http://localhost:8090/webjars/jquery.js or http://localhost:8090/webjars/jquery both responds with an exception
  4. Request http://localhost:8090/webjars/jquery/ or http://localhost:8090/webjars/jquery/foo.js both responds with 404

Output of uname -a or ver

No response

Output of java -version

openjdk version "21.0.1" 2023-10-17 LTS
OpenJDK Runtime Environment Zulu21.30+15-CA (build 21.0.1+12-LTS)
OpenJDK 64-Bit Server VM Zulu21.30+15-CA (build 21.0.1+12-LTS, mixed mode, sharing)

Quarkus version or git rev

3.11.0

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

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: C:\Users\r.mertyn.m2\wrapper\dists\apache-maven-3.9.6-bin\3311e1d4\apache-maven-3.9.6
Java version: 21.0.1, vendor: Azul Systems, Inc., runtime: C:\Program Files\Zulu\zulu-21
Default locale: de_DE, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Additional information

No response

@rar91279 rar91279 added the kind/bug Something isn't working label Jun 5, 2024
@geoand
Copy link
Contributor

geoand commented Jun 6, 2024

cc @ia3andy @phillip-kruger

@phillip-kruger phillip-kruger self-assigned this Jun 6, 2024
@quarkus-bot quarkus-bot bot added this to the 3.12 - main milestone Jun 6, 2024
@gsmet gsmet modified the milestones: 3.12 - main, 3.11.2 Jun 10, 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.

4 participants