summaryrefslogtreecommitdiffstats
path: root/modules/cache
diff options
context:
space:
mode:
Diffstat (limited to 'modules/cache')
-rw-r--r--modules/cache/cache_storage.c4
-rw-r--r--modules/cache/cache_util.c32
2 files changed, 18 insertions, 18 deletions
diff --git a/modules/cache/cache_storage.c b/modules/cache/cache_storage.c
index 6df17f2adb..217c1d74b4 100644
--- a/modules/cache/cache_storage.c
+++ b/modules/cache/cache_storage.c
@@ -115,7 +115,7 @@ int cache_create_entity(cache_request_rec *cache, request_rec *r,
static int filter_header_do(void *v, const char *key, const char *val)
{
- if ((*key == 'W' || *key == 'w') && !ap_casecmpstr(key, "Warning")
+ if ((*key == 'W' || *key == 'w') && !ap_cstr_casecmp(key, "Warning")
&& *val == '1') {
/* any stored Warning headers with warn-code 1xx (see section
* 14.46) MUST be deleted from the cache entry and the forwarded
@@ -129,7 +129,7 @@ static int filter_header_do(void *v, const char *key, const char *val)
}
static int remove_header_do(void *v, const char *key, const char *val)
{
- if ((*key == 'W' || *key == 'w') && !ap_casecmpstr(key, "Warning")) {
+ if ((*key == 'W' || *key == 'w') && !ap_cstr_casecmp(key, "Warning")) {
/* any stored Warning headers with warn-code 2xx MUST be retained
* in the cache entry and the forwarded response.
*/
diff --git a/modules/cache/cache_util.c b/modules/cache/cache_util.c
index 6f6fbb4323..c349d10e64 100644
--- a/modules/cache/cache_util.c
+++ b/modules/cache/cache_util.c
@@ -55,7 +55,7 @@ static int uri_meets_conditions(const apr_uri_t *filter, const int pathlen,
}
else {
/* The URI scheme must be present and identical except for case. */
- if (!url->scheme || ap_casecmpstr(filter->scheme, url->scheme)) {
+ if (!url->scheme || ap_cstr_casecmp(filter->scheme, url->scheme)) {
return 0;
}
@@ -999,7 +999,7 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
char *header = apr_pstrdup(r->pool, pragma_header);
const char *token = cache_strqtok(header, CACHE_SEPARATOR, &last);
while (token) {
- if (!ap_casecmpstr(token, "no-cache")) {
+ if (!ap_cstr_casecmp(token, "no-cache")) {
cc->no_cache = 1;
}
token = cache_strqtok(NULL, CACHE_SEPARATOR, &last);
@@ -1016,7 +1016,7 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
switch (token[0]) {
case 'n':
case 'N': {
- if (!ap_casecmpstrn(token, "no-cache", 8)) {
+ if (!ap_cstr_casecmpn(token, "no-cache", 8)) {
if (token[8] == '=') {
cc->no_cache_header = 1;
}
@@ -1024,17 +1024,17 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
cc->no_cache = 1;
}
}
- else if (!ap_casecmpstr(token, "no-store")) {
+ else if (!ap_cstr_casecmp(token, "no-store")) {
cc->no_store = 1;
}
- else if (!ap_casecmpstr(token, "no-transform")) {
+ else if (!ap_cstr_casecmp(token, "no-transform")) {
cc->no_transform = 1;
}
break;
}
case 'm':
case 'M': {
- if (!ap_casecmpstrn(token, "max-age", 7)) {
+ if (!ap_cstr_casecmpn(token, "max-age", 7)) {
if (token[7] == '='
&& !apr_strtoff(&offt, token + 8, &endp, 10)
&& endp > token + 8 && !*endp) {
@@ -1042,10 +1042,10 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
cc->max_age_value = offt;
}
}
- else if (!ap_casecmpstr(token, "must-revalidate")) {
+ else if (!ap_cstr_casecmp(token, "must-revalidate")) {
cc->must_revalidate = 1;
}
- else if (!ap_casecmpstrn(token, "max-stale", 9)) {
+ else if (!ap_cstr_casecmpn(token, "max-stale", 9)) {
if (token[9] == '='
&& !apr_strtoff(&offt, token + 10, &endp, 10)
&& endp > token + 10 && !*endp) {
@@ -1057,7 +1057,7 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
cc->max_stale_value = -1;
}
}
- else if (!ap_casecmpstrn(token, "min-fresh", 9)) {
+ else if (!ap_cstr_casecmpn(token, "min-fresh", 9)) {
if (token[9] == '='
&& !apr_strtoff(&offt, token + 10, &endp, 10)
&& endp > token + 10 && !*endp) {
@@ -1069,17 +1069,17 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
}
case 'o':
case 'O': {
- if (!ap_casecmpstr(token, "only-if-cached")) {
+ if (!ap_cstr_casecmp(token, "only-if-cached")) {
cc->only_if_cached = 1;
}
break;
}
case 'p':
case 'P': {
- if (!ap_casecmpstr(token, "public")) {
+ if (!ap_cstr_casecmp(token, "public")) {
cc->public = 1;
}
- else if (!ap_casecmpstrn(token, "private", 7)) {
+ else if (!ap_cstr_casecmpn(token, "private", 7)) {
if (token[7] == '=') {
cc->private_header = 1;
}
@@ -1087,14 +1087,14 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
cc->private = 1;
}
}
- else if (!ap_casecmpstr(token, "proxy-revalidate")) {
+ else if (!ap_cstr_casecmp(token, "proxy-revalidate")) {
cc->proxy_revalidate = 1;
}
break;
}
case 's':
case 'S': {
- if (!ap_casecmpstrn(token, "s-maxage", 8)) {
+ if (!ap_cstr_casecmpn(token, "s-maxage", 8)) {
if (token[8] == '='
&& !apr_strtoff(&offt, token + 9, &endp, 10)
&& endp > token + 9 && !*endp) {
@@ -1130,7 +1130,7 @@ static int cache_control_remove(request_rec *r, const char *cc_header,
switch (token[0]) {
case 'n':
case 'N': {
- if (!ap_casecmpstrn(token, "no-cache", 8)) {
+ if (!ap_cstr_casecmpn(token, "no-cache", 8)) {
if (token[8] == '=') {
const char *header = cache_strqtok(token + 9,
CACHE_SEPARATOR "\"", &slast);
@@ -1147,7 +1147,7 @@ static int cache_control_remove(request_rec *r, const char *cc_header,
}
case 'p':
case 'P': {
- if (!ap_casecmpstrn(token, "private", 7)) {
+ if (!ap_cstr_casecmpn(token, "private", 7)) {
if (token[7] == '=') {
const char *header = cache_strqtok(token + 8,
CACHE_SEPARATOR "\"", &slast);