summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/httpd.h1
-rw-r--r--server/util.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/httpd.h b/include/httpd.h
index c6f2d029e6..f563951cca 100644
--- a/include/httpd.h
+++ b/include/httpd.h
@@ -1453,6 +1453,7 @@ AP_DECLARE(int) ap_strcasecmp_match(const char *str, const char *exp);
* @param s1 The string to search
* @param s2 The substring to search for
* @return A pointer to the beginning of the substring
+ * @remark See apr_strmatch() for a faster alternative
*/
AP_DECLARE(char *) ap_strcasestr(const char *s1, const char *s2);
diff --git a/server/util.c b/server/util.c
index 65c695a5cb..c86e37cdbf 100644
--- a/server/util.c
+++ b/server/util.c
@@ -327,7 +327,7 @@ AP_DECLARE(char *) ap_strcasestr(const char *s1, const char *s2)
/* found first character of s2, see if the rest matches */
p1 = (char *)s1;
p2 = (char *)s2;
- while (apr_tolower(*++p1) == apr_tolower(*++p2)) {
+ for (++p1, ++p2; apr_tolower(*p1) == apr_tolower(*p2); ++p1, ++p2) {
if (*p1 == '\0') {
/* both strings ended together */
return((char *)s1);