You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
783 B
19 lines
783 B
--- a/modules/aaa/mod_authnz_ldap.c 2018/02/15 17:33:04 1824335 |
|
+++ b/modules/aaa/mod_authnz_ldap.c 2018/02/15 17:42:14 1824336 |
|
@@ -126,9 +126,13 @@ |
|
|
|
charset = (char*) apr_hash_get(charset_conversions, language, APR_HASH_KEY_STRING); |
|
|
|
- if (!charset) { |
|
- language[2] = '\0'; |
|
- charset = (char*) apr_hash_get(charset_conversions, language, APR_HASH_KEY_STRING); |
|
+ /* |
|
+ * Test if language values like 'en-US' return a match from the charset |
|
+ * conversion map when shortened to 'en'. |
|
+ */ |
|
+ if (!charset && strlen(language) > 3 && language[2] == '-') { |
|
+ char *language_short = apr_pstrndup(p, language, 2); |
|
+ charset = (char*) apr_hash_get(charset_conversions, language_short, APR_HASH_KEY_STRING); |
|
} |
|
|
|
if (charset) {
|
|
|