Commit f50e4b1f authored by Graham Leggett's avatar Graham Leggett
Browse files

mod_authnz_ldap: Fix language long names detection as short name.

trunk patch: http://svn.apache.org/r1824336
+1: ylavic, elukey, rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1824456 13f79535-47bb-0310-9956-ffa450edef68
parent 9dc3702d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.4.30

  *) mod_authnz_ldap: Fix language long names detection as short name.
     [Yann Ylavic]

  *) mod_proxy: Worker schemes and hostnames which are too large are no
     longer fatal errors; it is logged and the truncated values are stored.
     [Jim Jagielski]
+0 −5
Original line number Diff line number Diff line
@@ -118,11 +118,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]

  *) mod_authnz_ldap: Fix language long names detection as short name.
     trunk patch: http://svn.apache.org/r1824336
     2.4.x patch: trunk works (modulo CHANGES)
     +1: ylavic, elukey, rpluem


PATCHES PROPOSED TO BACKPORT FROM TRUNK:
  [ New proposals should be added at the end of the list ]
+7 −3
Original line number Diff line number Diff line
@@ -126,9 +126,13 @@ static char* derive_codepage_from_lang (apr_pool_t *p, char *language)

    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) {