diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2016-06-09 02:06:42 +0200 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2016-06-09 02:06:42 +0200 |
commit | f4cc76ee717004baf0f82a0aed1a0e02ffaeb10f (patch) | |
tree | 7c8af9d3454c38a02fd1dd3db52cdea99960b27e /modules/cache | |
parent | Update code to mirror r1747461 of apr-2.0 apr_cstr.c. (diff) | |
download | apache2-f4cc76ee717004baf0f82a0aed1a0e02ffaeb10f.tar.xz apache2-f4cc76ee717004baf0f82a0aed1a0e02ffaeb10f.zip |
Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygen
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747469 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/cache')
-rw-r--r-- | modules/cache/cache_storage.c | 4 | ||||
-rw-r--r-- | modules/cache/cache_util.c | 32 |
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); |