-
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
Accept-Language header not parsed correctly for language subtags, variants, extension and private subtags #36227
Labels
kind/bug
Something isn't working
Milestone
Comments
nderwin
added a commit
to nderwin-forks/quarkus
that referenced
this issue
Oct 1, 2023
…header. This is a fix for quarkusio#36227. Signed-off-by:Nathan Erwin <[email protected]>
nderwin
added a commit
to nderwin-forks/quarkus
that referenced
this issue
Oct 2, 2023
…header * added some tests with various language tag scenarios * Fixes quarkusio#36227 Signed-off-by:Nathan Erwin <[email protected]>
FYI I need to look into this for RESTEasy because the change causes TCK failures. |
nderwin
added a commit
to nderwin-forks/quarkus
that referenced
this issue
Mar 18, 2024
…header * added some tests with various language tag scenarios * Fixes quarkusio#36227 Signed-off-by:Nathan Erwin <[email protected]>
nderwin
added a commit
to nderwin-forks/quarkus
that referenced
this issue
Oct 1, 2024
…header * added some tests with various language tag scenarios * Fixes quarkusio#36227 Signed-off-by:Nathan Erwin <[email protected]>
bschuhmann
pushed a commit
to bschuhmann/quarkus
that referenced
this issue
Nov 16, 2024
…header * added some tests with various language tag scenarios * Fixes quarkusio#36227 Signed-off-by:Nathan Erwin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using an Accept-Language header for HTTP requests that contains more than simple language or language-country forms, the parsed
Locale
does not correctly reflect the given language tag as defined in https://www.rfc-editor.org/rfc/rfc9110#section-12.5.4.Other examples of complex tags can be found in https://www.w3.org/International/articles/language-tags/.
Expected behavior
Language tags are parsed into a Locale that correctly reflects the given data; examples (not sure if
zh-yue
being turned intoyue
orar-afb
being turned intoafb
are correct, but that's whatjava.util.Locale
turns it into):Actual behavior
Simpler language tags are parsed correctly, but some of the more complex ones are not:
How to Reproduce?
i18n-with-quarkus-reactive.zip
./mvnw clean compile quarkus:dev
tests.sh
script to run somecurl
commands, or craft your own with anAccept-Language
header for the URLhttp://localhost:8080/hello
Output of
uname -a
orver
Linux laverne 6.2.0-33-generic #33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 7 10:33:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "17.0.8.1" 2023-08-24
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.4.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.3 (21122926829f1ead511c958d89bd2f672198ae9f)
Additional information
No response
The text was updated successfully, but these errors were encountered: