Commit 181920ee authored by Doug MacEachern's avatar Doug MacEachern
Browse files

fix ProxyPass when frontend is https and backend is http


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@94515 13f79535-47bb-0310-9956-ffa450edef68
parent a4a00bcc
Loading
Loading
Loading
Loading
+23 −0
Changes for mod_ssl.c: 23 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -252,6 +252,24 @@ int ssl_proxy_enable(conn_rec *c)
    }

    sslconn->is_proxy = 1;
    sslconn->disabled = 0;

    return 1;
}

int ssl_engine_disable(conn_rec *c)
{
    SSLSrvConfigRec *sc = mySrvConfig(c->base_server);

    SSLConnRec *sslconn;

    if (!sc->enabled) {
        return 0;
    }

    sslconn = ssl_init_connection_ctx(c);

    sslconn->disabled = 1;

    return 1;
}
@@ -279,6 +297,10 @@ static int ssl_hook_pre_connection(conn_rec *c, void *csd)
        sslconn = ssl_init_connection_ctx(c);
    }

    if (sslconn->disabled) {
        return DECLINED;
    }

    sslconn->log_level = sc->log_level;

    /*
@@ -560,6 +582,7 @@ static void ssl_register_hooks(apr_pool_t *p)
    ssl_var_register();

    APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable);
    APR_REGISTER_OPTIONAL_FN(ssl_engine_disable);
}

module AP_MODULE_DECLARE_DATA ssl_module = {
+4 −0
Changes for mod_ssl.h: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -432,6 +432,7 @@ typedef struct {
    int verify_depth;
    int log_level; /* for avoiding expensive logging */
    int is_proxy;
    int disabled;
} SSLConnRec;

#define SSLConnLogApplies(sslconn, level) (sslconn->log_level >= level)
@@ -722,9 +723,12 @@ APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup,

/* Proxy Support */
int ssl_proxy_enable(conn_rec *c);
int ssl_engine_disable(conn_rec *c);

APR_DECLARE_OPTIONAL_FN(int, ssl_proxy_enable, (conn_rec *));

APR_DECLARE_OPTIONAL_FN(int, ssl_engine_disable, (conn_rec *));

/*  I/O  */
void         ssl_io_filter_init(conn_rec *, SSL *);
void         ssl_io_filter_register(apr_pool_t *);