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

(-)modules/proxy/proxy_util.c (+5 lines)
Lines 2168-2173 Link Here
2168
    else {
2168
    else {
2169
        conn->addr = worker->cp->addr;
2169
        conn->addr = worker->cp->addr;
2170
    }
2170
    }
2171
    /* Close a possible existing socket if we are told to do so */
2172
    if (conn->close) {
2173
        socket_cleanup(conn);
2174
        conn->close = 0;
2175
    }
2171
2176
2172
    if (err != APR_SUCCESS) {
2177
    if (err != APR_SUCCESS) {
2173
        return ap_proxyerror(r, HTTP_BAD_GATEWAY,
2178
        return ap_proxyerror(r, HTTP_BAD_GATEWAY,
(-)modules/proxy/mod_proxy_http.c (+15 lines)
Lines 1927-1932 Link Here
1927
        ap_proxy_ssl_connection_cleanup(backend, r);
1927
        ap_proxy_ssl_connection_cleanup(backend, r);
1928
    }
1928
    }
1929
1929
1930
    /*
1931
     * In the case that we are handling a reverse proxy connection and this
1932
     * is not a request that is coming over an already kept alive connection
1933
     * with the client, do NOT reuse the connection to the backend, because
1934
     * we cannot forward a failure to the client in this case as the client
1935
     * does NOT expects this in this situation.
1936
     * Yes, this creates a performance penalty.
1937
     * XXX: Make this behaviour configurable: Either via an environment
1938
     * variable or via a worker configuration directive.
1939
     */
1940
    if ((r->proxyreq == PROXYREQ_REVERSE) && (!c->keepalives)
1941
        && (apr_table_get(r->subprocess_env, "proxy-initial-not-pooled"))) {
1942
        backend->close = 1;
1943
    }
1944
1930
    /* Step One: Determine Who To Connect To */
1945
    /* Step One: Determine Who To Connect To */
1931
    if ((status = ap_proxy_determine_connection(p, r, conf, worker, backend,
1946
    if ((status = ap_proxy_determine_connection(p, r, conf, worker, backend,
1932
                                                uri, &url, proxyname,
1947
                                                uri, &url, proxyname,

Return to bug 37770