Hi,

1 typo below.

Moreover, this kind of patch is a good candidate for backport as it introduces many small differences between 2.4 and trunk.
Without a backport, backporting future patches may become a nightmare.

I would find useful to split it into several pieces.
The first one should apply cleanly to 2.4.x to ease backport.
Other parts should be splitted in "as many piece as necessary" for potential future backport.

CJ


Le 23/11/2015 17:46, yla...@apache.org a écrit :
Author: ylavic
Date: Mon Nov 23 16:46:01 2015
New Revision: 1715876

URL: http://svn.apache.org/viewvc?rev=1715876&view=rev
Log:
Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).

Modified:

Modified: httpd/httpd/trunk/modules/cache/cache_util.c
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_util.c?rev=1715876&r1=1715875&r2=1715876&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_util.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_util.c Mon Nov 23 16:46:01 2015
[...]
@@ -1066,59 +1045,46 @@ int ap_cache_control(request_rec *r, cac
                          cc->max_stale = 1;
                          cc->max_stale_value = -1;
                      }
-                    break;
                  }
-                else if (!strncasecmp(token, "min-fresh", 9)) {
+                else if (!ap_casecmpstrn(token, "min-fresh", 9)) {
                      if (token[9] == '=') {
                          cc->min_fresh = 1;
                          cc->min_fresh_value = apr_atoi64(token + 10);
                      }
-                    break;
Thanks for that. I was about to commit the same kind of patch (remove useless break).

-                }
-                else if (!strcasecmp(token, "must-revalidate")) {
-                    cc->must_revalidate = 1;
                  }
                  break;
              }
              case 'o':
              case 'O': {
-                if (!strcasecmp(token, "only-if-cached")) {
+                if (!ap_casecmpstr(token, "only-if-cached")) {
                      cc->only_if_cached = 1;
                  }
                  break;
              }
-            case 'p':
-            case 'P': {
-                /* handle most common quickest cases... */
-                if (!strcmp(token, "private")) {
-                    cc->private = 1;
-                }
-                /* ...then try slowest cases */
-                else if (!strcasecmp(token, "public")) {
+            case 'p': {
case 'P' removed?

Best regards,
CJ

Reply via email to