]> granicus.if.org Git - apache/commitdiff
mod_proxy: follow up to r1645529: 502 in case of SSL handshake failure.
authorYann Ylavic <ylavic@apache.org>
Tue, 28 Aug 2018 12:42:21 +0000 (12:42 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 28 Aug 2018 12:42:21 +0000 (12:42 +0000)
Make the SSL filters chain return an error when the handshake fails with an
origin server. It can then be caught by mod_proxy to fail with 502.

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

modules/ssl/ssl_engine_io.c

index 82315833482645baf9887d2d8f7a13a78ce77edc..3ce049391001aca33150450c277151bf2cd10365 100644 (file)
@@ -1017,14 +1017,10 @@ static apr_status_t ssl_io_filter_error(bio_filter_in_ctx_t *inctx,
             break;
 
     case MODSSL_ERROR_BAD_GATEWAY:
-        /* Send an error bucket, though the proxy currently has no
-         * special handling for error buckets and ignores this. */
-        bucket = ap_bucket_error_create(HTTP_BAD_GATEWAY, NULL,
-                                        f->c->pool,
-                                        f->c->bucket_alloc);
         ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, f->c, APLOGNO(01997)
                       "SSL handshake failed: sending 502");
-        break;
+        f->c->aborted = 1;
+        return APR_EGENERAL;
 
     default:
         return status;