mirror of
https://github.com/apache/httpd.git
synced 2025-08-20 14:14:48 +00:00
Axe some redundant conditions. PR 62549.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837941 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
6
modules/cache/cache_util.c
vendored
6
modules/cache/cache_util.c
vendored
@ -711,7 +711,7 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
|
||||
(apr_time_sec(info->expire - info->date)) > age))) {
|
||||
/* make sure we don't stomp on a previous warning */
|
||||
if ((warn_head == NULL) ||
|
||||
((warn_head != NULL) && (ap_strstr_c(warn_head, "110") == NULL))) {
|
||||
(ap_strstr_c(warn_head, "110") == NULL)) {
|
||||
apr_table_mergen(h->resp_hdrs, "Warning",
|
||||
"110 Response is stale");
|
||||
}
|
||||
@ -730,7 +730,7 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
|
||||
* the new warning to the correct *headers_out location.
|
||||
*/
|
||||
if ((warn_head == NULL) ||
|
||||
((warn_head != NULL) && (ap_strstr_c(warn_head, "113") == NULL))) {
|
||||
(ap_strstr_c(warn_head, "113") == NULL)) {
|
||||
apr_table_mergen(h->resp_hdrs, "Warning",
|
||||
"113 Heuristic expiration");
|
||||
}
|
||||
@ -787,7 +787,7 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
|
||||
/* make sure we don't stomp on a previous warning */
|
||||
warn_head = apr_table_get(h->resp_hdrs, "Warning");
|
||||
if ((warn_head == NULL) ||
|
||||
((warn_head != NULL) && (ap_strstr_c(warn_head, "110") == NULL))) {
|
||||
(ap_strstr_c(warn_head, "110") == NULL)) {
|
||||
apr_table_mergen(h->resp_hdrs, "Warning",
|
||||
"110 Response is stale");
|
||||
}
|
||||
|
8
modules/cache/mod_cache.c
vendored
8
modules/cache/mod_cache.c
vendored
@ -909,8 +909,8 @@ static apr_status_t cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
|
||||
|
||||
/* add a revalidation warning */
|
||||
warn_head = apr_table_get(r->err_headers_out, "Warning");
|
||||
if ((warn_head == NULL) || ((warn_head != NULL)
|
||||
&& (ap_strstr_c(warn_head, "111") == NULL))) {
|
||||
if ((warn_head == NULL) ||
|
||||
(ap_strstr_c(warn_head, "111") == NULL)) {
|
||||
apr_table_mergen(r->err_headers_out, "Warning",
|
||||
"111 Revalidation failed");
|
||||
}
|
||||
@ -1901,8 +1901,8 @@ static void cache_insert_error_filter(request_rec *r)
|
||||
|
||||
/* add a revalidation warning */
|
||||
warn_head = apr_table_get(r->err_headers_out, "Warning");
|
||||
if ((warn_head == NULL) || ((warn_head != NULL)
|
||||
&& (ap_strstr_c(warn_head, "111") == NULL))) {
|
||||
if ((warn_head == NULL)
|
||||
|| ap_strstr_c(warn_head, "111") == NULL) {
|
||||
apr_table_mergen(r->err_headers_out, "Warning",
|
||||
"111 Revalidation failed");
|
||||
}
|
||||
|
Reference in New Issue
Block a user