From: Stefan Eissing Date: Thu, 14 Apr 2022 08:24:19 +0000 (+0000) Subject: *) mod_http: use defined constant instead of just '101' when X-Git-Tag: 2.5.0-alpha2-ci-test-only~399 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33a77a5067cfb6af1c016920ec5a503160bf7f68;p=thirdparty%2Fapache%2Fhttpd.git *) mod_http: use defined constant instead of just '101' when testing response stati. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899838 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index 42a89cbea45..c3ca4aafebc 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -1219,7 +1219,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f, if (respb) { ap_bucket_response *resp = respb->data; - if (resp->status >= 200 || resp->status == 101) { + if (resp->status >= 200 || resp->status == HTTP_SWITCHING_PROTOCOLS) { /* Someone is passing the final response, remember it * so we no longer generate one. */ ctx->final_status = resp->status; @@ -1312,7 +1312,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f, } ap_remove_output_filter(f); } - else if (ctx->final_status == 101) { + else if (ctx->final_status == HTTP_SWITCHING_PROTOCOLS) { /* switching protocol, whatever comes next is not HTTP/1.x */ ap_remove_output_filter(f); } @@ -1937,7 +1937,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_h1_response_out_filter(ap_filter_t *f, APR_BRIGADE_CONCAT(b, ctx->tmpbb); - if (resp->status == 101) { + if (resp->status == HTTP_SWITCHING_PROTOCOLS) { /* switched to another protocol, get out of the way */ AP_DEBUG_ASSERT(!r->chunked); ap_remove_output_filter(f);