-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
IllegalArgumentException when parsing Accept Header #45385
Comments
Thanks for reporting. What version of Quarkus are you using? If it's with the latest, please attach a sample project that shows the problem in action |
I'm using Quarkus 3.15.1 |
Thanks. Can you attach a sample that show the problem in action? |
Unfortunately, I cannot share the project. |
It doesn't have to be the actual project you are working on. It's best to create a sample that contains just enough code that exhibit the problem you are describing. |
Probably any project will work, you can even use the default health endpoint of quarkus: curl -H "Accept: Any" -k https://localhost:8443/health |
Unfortunately it does not |
Closing for a lack of a reproducer |
Fortunately (or not!), this one was bugging me as the stacktrace looked legit (I mean from the code, it looked like it could be a real issue) and I was able to reproduce it with a bit of luck - we definitely didn't have enough information to be able to reproduce it and it was a lucky guess as I gave me 5 minutes to try to get something. Here is a reproducer: In a term:
In another term:
will trigger:
|
Thanks! I'll check |
Fix incorrect response code when media type is invalid
Fixes: quarkusio#45385 (cherry picked from commit 95ce4e9)
Describe the bug
I've seen 34858, but it seems that the Issue has resurfaced, because I can reproduce it with version 3.15.1
When sending a request with a header "Accept: Any", the following Stack-Trace can be found in the logs and the HTTP Code is 500. The fix for the former Bug-Report was in ClassRoutingHandler, but this class is not in the Stack-Trace I got:
Expected behavior
HTTP 406
Actual behavior
HTTP 500 and an Exception in the log
How to Reproduce?
Send request with "Accept: Any" to an endpoint like this:
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
3.15.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: