]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
*) mod_http: use defined constant instead of just '101' when
authorStefan Eissing <icing@apache.org>
Thu, 14 Apr 2022 08:24:19 +0000 (08:24 +0000)
committerStefan Eissing <icing@apache.org>
Thu, 14 Apr 2022 08:24:19 +0000 (08:24 +0000)
     testing response stati.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899838 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_filters.c

index 42a89cbea4566e5d72f1902d51bd6d1c62b899ba..c3ca4aafebc5038514bcc38fecac458c186cdbf5 100644 (file)
@@ -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);