View | Details | Raw Unified | Return to bug 63430
Collapse All | Expand All

(-)modules/ssl/mod_ssl.c (+10 lines)
Lines 448-457 static SSLConnRec *ssl_init_connection_ctx(conn_re Link Here
448
    SSLConnRec *sslconn = myConnConfig(c);
448
    SSLConnRec *sslconn = myConnConfig(c);
449
    int need_setup = 0;
449
    int need_setup = 0;
450
450
451
    /* mod_proxy's (r->)per_dir_config has the lifetime of the request, thus
452
     * it uses ssl_engine_set() to reset sslconn->dc when reusing SSL backend
453
     * connections, so we must fall through here. But in the case where we are
454
     * called from ssl_init_ssl_connection() with no per_dir_config (which also
455
     * includes mod_proxy's later run_pre_connection call), sslconn->dc should
456
     * be preserved if it's already set.
457
     */
451
    if (!sslconn) {
458
    if (!sslconn) {
452
        sslconn = apr_pcalloc(c->pool, sizeof(*sslconn));
459
        sslconn = apr_pcalloc(c->pool, sizeof(*sslconn));
453
        need_setup = 1;
460
        need_setup = 1;
454
    }
461
    }
462
    else if (!new_proxy) {
463
        return sslconn;
464
    }
455
465
456
    /* Reinit dc in any case because it may be r->per_dir_config scoped
466
    /* Reinit dc in any case because it may be r->per_dir_config scoped
457
     * and thus a caller like mod_proxy needs to update it per request.
467
     * and thus a caller like mod_proxy needs to update it per request.

Return to bug 63430