-
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
Fix HttpHeaders.getAcceptableLanguages() on empty headers #44259
Conversation
e20b7e7
to
5aec172
Compare
This comment has been minimized.
This comment has been minimized.
`jakarta.ws.rs.core.HttpHeaders.getAcceptableLanguages` requires that a wildcard locale is returned, if no acceptable language is specified. The previous behavior returned an empty list. Closes quarkusio#44253
6ceb83a
to
5ad6ccb
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution.
I don't think Locale.ROOT
is a wildcard. Its javadoc says its language is set to the empty string, while a wildcard should have its language set to *
.
Also, could you add a test for this? It will probably highlight this issue.
And I suspect the test failure may be related, somehow, it should be investigated.
Thanks a lot :)
Maybe the docs are a bit confusing,
This is a good idea; I will try to add a test.
Some failing tests seem to be I/O related. For example, one error looks like this:
Maybe these tests can refactored to be more robust, but this should be handled in another pull request. |
The test failure was transient, nothing to do with this PR |
I added a test and no longer use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I do wonder why this is not tested in the TCK, but 🤷
This comment has been minimized.
This comment has been minimized.
49a8a46
to
c55d0be
Compare
Status for workflow
|
jakarta.ws.rs.core.HttpHeaders.getAcceptableLanguages
requires that a wildcard locale is returned, if no acceptable language is specified. The previous behavior returned an empty list.getAcceptableLanguages()
#44253