The Accept-Language header parsing was not correctly handling quality factors. When a browser sends "en-GB,de-DE;q=0.5", the expected behavior is to prefer English (q=1.0 by default) over German (q=0.5). The fix uses golang.org/x/text/language.ParseAcceptLanguage to properly parse and sort language preferences by quality factor. It also adds base language fallbacks (e.g., "en" for "en-GB") to ensure regional variants match their parent languages when no exact match exists. Fixes #1022 Signed-off-by: majiayu000 <1835304752@qq.com> |
||
|---|---|---|
| .. | ||
| challenge | ||
| config | ||
| localization | ||
| policy | ||
| store | ||
| testdata | ||
| thoth | ||
| anubis.go | ||
| anubis_test.go | ||
| config.go | ||
| config_test.go | ||
| http.go | ||
| http_test.go | ||
| redirect_security_test.go | ||