You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Reactive Resteasy implementation of jakarta.ws.rs.core.HttpHeaders differs from the documentation. If a request contains no Accept-Language header and HttpHeaders.getAcceptableLangauges() is called, it will return an empty list.
`jakarta.ws.rs.core.HttpHeaders.getAcceptableLangauges` requires
that a wildcard locale is returned, if no acceptable language is
specified. The previous behavior returned an empty list.
Closesquarkusio#44253
`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.
Closesquarkusio#44253
`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.
Closesquarkusio#44253
Describe the bug
The Reactive Resteasy implementation of
jakarta.ws.rs.core.HttpHeaders
differs from the documentation. If a request contains noAccept-Language
header andHttpHeaders.getAcceptableLangauges()
is called, it will return an empty list.The documentation specifies that a wildcard locale is returned, if no acceptable languages are specified: https://jakarta.ee/specifications/platform/10/apidocs/jakarta/ws/rs/core/httpheaders#getAcceptableLanguages().
Expected behavior
Calling
HttpHeaders.getAcceptableLangauges()
returns a list with a single wildcard locale, if no acceptable language header is given.Actual behavior
Calling
HttpHeaders.getAcceptableLangauges()
returns an empty list, if no acceptable language header is given.How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
The reason for this issue is here:
quarkus/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/headers/HeaderUtil.java
Line 296 in e158abc
Instead of returning an empty list, it should return a wildcard locale, like it is done here: https://github.com/resteasy/resteasy/blob/91f23fff5eca4b45fba4f45b938dca2fe5c0d16d/resteasy-core/src/main/java/org/jboss/resteasy/specimpl/ResteasyHttpHeaders.java#L232
The text was updated successfully, but these errors were encountered: