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

(-)a/modules/http2/mod_proxy_http2.c (-15 / +6 lines)
Lines 590-610 run_connect: Link Here
590
            goto reconnect;
590
            goto reconnect;
591
        }
591
        }
592
        
592
        
593
        if (!ctx->p_conn->data) {
593
        if (!ctx->p_conn->data && ctx->is_ssl) {
594
            /* New conection: set a note on the connection what CN is
594
            /* New SSL connection: set a note on the connection about what
595
             * requested and what protocol we want */
595
             * protocol we want.
596
            if (ctx->p_conn->ssl_hostname) {
596
             */
597
                ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, ctx->owner, 
597
            apr_table_setn(ctx->p_conn->connection->notes,
598
                              "set SNI to %s for (%s)", 
598
                           "proxy-request-alpn-protos", "h2");
599
                              ctx->p_conn->ssl_hostname, 
600
                              ctx->p_conn->hostname);
601
                apr_table_setn(ctx->p_conn->connection->notes,
602
                               "proxy-request-hostname", ctx->p_conn->ssl_hostname);
603
            }
604
            if (ctx->is_ssl) {
605
                apr_table_setn(ctx->p_conn->connection->notes,
606
                               "proxy-request-alpn-protos", "h2");
607
            }
608
        }
599
        }
609
    }
600
    }
610
601
(-)a/modules/proxy/mod_proxy_hcheck.c (+1 lines)
Lines 617-622 static int hc_get_backend(const char *proxy_function, proxy_conn_rec **backend, Link Here
617
                return !OK;
617
                return !OK;
618
            }
618
            }
619
            (*backend)->is_ssl = 1;
619
            (*backend)->is_ssl = 1;
620
            (*backend)->ssl_hostname = hc->s->hostname_ex;
620
        }
621
        }
621
622
622
    }
623
    }
(-)a/modules/proxy/mod_proxy_http.c (-14 / +4 lines)
Lines 1972-1991 static int proxy_http_handler(request_rec *r, proxy_worker *worker, Link Here
1972
        }
1972
        }
1973
1973
1974
        /* Step Three: Create conn_rec */
1974
        /* Step Three: Create conn_rec */
1975
        if (!backend->connection) {
1975
        if (!backend->connection &&
1976
            if ((status = ap_proxy_connection_create_ex(proxy_function,
1976
                (status = ap_proxy_connection_create_ex(proxy_function,
1977
                                                        backend, r)) != OK)
1977
                                                        backend, r)) != OK) {
1978
                break;
1978
            break;
1979
            /*
1980
             * On SSL connections set a note on the connection what CN is
1981
             * requested, such that mod_ssl can check if it is requested to do
1982
             * so.
1983
             */
1984
            if (backend->ssl_hostname) {
1985
                apr_table_setn(backend->connection->notes,
1986
                               "proxy-request-hostname",
1987
                               backend->ssl_hostname);
1988
            }
1989
        }
1979
        }
1990
1980
1991
        /* Step Four: Send the Request
1981
        /* Step Four: Send the Request
(-)a/modules/proxy/proxy_util.c (-1 / +7 lines)
Lines 3203-3208 static int proxy_connection_create(const char *proxy_function, Link Here
3203
                         backend_addr, conn->hostname);
3203
                         backend_addr, conn->hostname);
3204
            return HTTP_INTERNAL_SERVER_ERROR;
3204
            return HTTP_INTERNAL_SERVER_ERROR;
3205
        }
3205
        }
3206
        if (conn->ssl_hostname) {
3207
            /* Set a note on the connection about what CN is requested,
3208
             * such that mod_ssl can check if it is requested to do so.
3209
             */
3210
            apr_table_setn(conn->connection->notes, "proxy-request-hostname",
3211
                           conn->ssl_hostname);
3212
        }
3206
    }
3213
    }
3207
    else {
3214
    else {
3208
        /* TODO: See if this will break FTP */
3215
        /* TODO: See if this will break FTP */
3209
- 

Return to bug 62837