Commit e2900677 authored by Mladen Turk's avatar Mladen Turk
Browse files

Add PROXY_WORKER_IGNORE_ERRORS flags that

disables puting the entire worker in retry mode, cause
for forward workers the remote is not fixed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105047 13f79535-47bb-0310-9956-ffa450edef68
parent c6447778
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -1120,13 +1120,16 @@ static const char *

    psf->req = flag;
    psf->req_set = 1;

    if (flag) {
        /* Add default forward proxy worker */
        if ((err = ap_proxy_add_worker(&(psf->forward), parms->pool,
                                       psf, "*://*:0"))) {
            return apr_pstrcat(parms->temp_pool, "ProxyRequests ", err, NULL); 
        }
        

        /* Do not disable worker in case of errors */
        psf->forward->status = PROXY_WORKER_IGNORE_ERRORS;
    }
    return NULL;
}

+1 −0
Original line number Diff line number Diff line
@@ -224,6 +224,7 @@ struct proxy_conn_pool {

/* woker status flags */
#define PROXY_WORKER_INITIALIZED    0x0001
#define PROXY_WORKER_IGNORE_ERRORS  0x0002
#define PROXY_WORKER_IN_SHUTDOWN    0x0010
#define PROXY_WORKER_DISABLED       0x0020
#define PROXY_WORKER_IN_ERROR       0x0040
+4 −2
Original line number Diff line number Diff line
@@ -1812,11 +1812,13 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
        conn->sock   = newsock;
        connected    = 1;
    }
    /* Put the entire worker to error state
    /* Put the entire worker to error state if
     * the PROXY_WORKER_IGNORE_ERRORS flag is not set.
     * Altrough some connections may be alive
     * no further connections to the worker could be made
     */
    if (!connected && PROXY_WORKER_IS_USABLE(worker)) {
    if (!connected && PROXY_WORKER_IS_USABLE(worker) &&
        !(worker->status & PROXY_WORKER_IGNORE_ERRORS)) {
        worker->status |= PROXY_WORKER_IN_ERROR;
        worker->error_time = apr_time_now();
        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,