]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_negotiation: LanguagePriority tags must be treated case-insensitive,
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 16 Jan 2019 16:37:41 +0000 (16:37 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 16 Jan 2019 16:37:41 +0000 (16:37 +0000)
per https://tools.ietf.org/html/rfc7231#section-3.1.3.1

PR: 39730
Backports: r1850989
Submitted by: jailletc36
Reviewed by: jailletc36, wrowe, jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1851468 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/mappers/mod_negotiation.c

diff --git a/CHANGES b/CHANGES
index 4b0a07fdcf5b93df894edc2715c84f69e12d2f38..e3f54764e8c5d2e245a95580971266e4d9410fba 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.38
 
+  *) mod_negotiation: Treat LanguagePriority as case-insensitive to match
+     AddLanguage behavior and HTTP specification. PR 39730 [Christophe Jaillet]
+  
   *) mod_md: incorrect behaviour when synchronizing ongoing ACME challenges
      have been fixed. [Michael Kaufmann, Stefan Eissing]
   
diff --git a/STATUS b/STATUS
index e5a7eb654a19071a1fdd8bbac7080aa9b74f6fbd..68b1473c0bb81f5e890b7b22abfc6870ecb7ac33 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -213,12 +213,6 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK:
      2.4.x patch: svn merge -c 1851093 ^/httpd/httpd/trunk .
      +1: jailletc36 (by inspection), jim
 
-  *) mod_negotiation: LanguagePriority tags must be treated case-insensitive,
-     per https://tools.ietf.org/html/rfc7231#section-3.1.3.1  PR 39730
-     trunk patch: http://svn.apache.org/r1850989
-     2.4.x patch: svn merge -c 1850989 ^/httpd/httpd/trunk .
-     +1: jailletc36, wrowe, jim
-
   *) easy proposals:
        - mod_authn_dbm: Return APR_SUCCESS which is equivalent but more readable
          than 'rv' here
index 3f04d83ddf022eae8622408756543b9ddb0f3625..b6dfedc6c0eb341359dde912406efedd2cd1b23f 100644 (file)
@@ -1459,7 +1459,7 @@ static int find_lang_index(apr_array_header_t *accept_langs, char *lang)
     alang = (const char **) accept_langs->elts;
 
     for (i = 0; i < accept_langs->nelts; ++i) {
-        if (!strncmp(lang, *alang, strlen(*alang))) {
+        if (!ap_cstr_casecmpn(lang, *alang, strlen(*alang))) {
             return i;
         }
         alang += (accept_langs->elt_size / sizeof(char*));