Lines 544-550
static void dump_header_to_log(request_rec *r, unsigned char fheader[],
Link Here
|
544 |
} |
544 |
} |
545 |
|
545 |
|
546 |
static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf, |
546 |
static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf, |
547 |
request_rec *r, apr_uint16_t request_id) |
547 |
proxy_server_conf *sconf, request_rec *r, |
|
|
548 |
apr_uint16_t request_id) |
548 |
{ |
549 |
{ |
549 |
apr_bucket_brigade *ib, *ob; |
550 |
apr_bucket_brigade *ib, *ob; |
550 |
int seen_end_of_headers = 0, done = 0; |
551 |
int seen_end_of_headers = 0, done = 0; |
Lines 569-582
static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
Link Here
|
569 |
ob = apr_brigade_create(r->pool, c->bucket_alloc); |
570 |
ob = apr_brigade_create(r->pool, c->bucket_alloc); |
570 |
|
571 |
|
571 |
while (! done) { |
572 |
while (! done) { |
572 |
apr_interval_time_t timeout = conn->worker->s->timeout; |
573 |
apr_interval_time_t timeout; |
573 |
apr_size_t len; |
574 |
apr_size_t len; |
574 |
int n; |
575 |
int n; |
575 |
|
576 |
|
576 |
/* We need SOME kind of timeout here, or virtually anything will |
577 |
/* We need SOME kind of timeout here, or virtually anything will |
577 |
* cause timeout errors. */ |
578 |
* cause timeout errors. */ |
578 |
if (! conn->worker->s->timeout_set) { |
579 |
if (conn->worker->s->timeout_set) { |
579 |
timeout = apr_time_from_sec(30); |
580 |
timeout = conn->worker->s->timeout; |
|
|
581 |
} |
582 |
else if (sconf->timeout_set) { |
583 |
timeout = sconf->timeout; |
584 |
} |
585 |
else { |
586 |
timeout = r->server->timeout; |
580 |
} |
587 |
} |
581 |
|
588 |
|
582 |
rv = apr_poll(&pfd, 1, &n, timeout); |
589 |
rv = apr_poll(&pfd, 1, &n, timeout); |
Lines 877-882
static int fcgi_do_request(apr_pool_t *p, request_rec *r,
Link Here
|
877 |
proxy_conn_rec *conn, |
884 |
proxy_conn_rec *conn, |
878 |
conn_rec *origin, |
885 |
conn_rec *origin, |
879 |
proxy_dir_conf *conf, |
886 |
proxy_dir_conf *conf, |
|
|
887 |
proxy_server_conf *sconf, |
880 |
apr_uri_t *uri, |
888 |
apr_uri_t *uri, |
881 |
char *url, char *server_portstr) |
889 |
char *url, char *server_portstr) |
882 |
{ |
890 |
{ |
Lines 907-913
static int fcgi_do_request(apr_pool_t *p, request_rec *r,
Link Here
|
907 |
} |
915 |
} |
908 |
|
916 |
|
909 |
/* Step 3: Read records from the back end server and handle them. */ |
917 |
/* Step 3: Read records from the back end server and handle them. */ |
910 |
rv = dispatch(conn, conf, r, request_id); |
918 |
rv = dispatch(conn, conf, sconf, r, request_id); |
911 |
if (rv != APR_SUCCESS) { |
919 |
if (rv != APR_SUCCESS) { |
912 |
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01075) |
920 |
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01075) |
913 |
"Error dispatching request to %s:", server_portstr); |
921 |
"Error dispatching request to %s:", server_portstr); |
Lines 994-1000
static int proxy_fcgi_handler(request_rec *r, proxy_worker *worker,
Link Here
|
994 |
} |
1002 |
} |
995 |
|
1003 |
|
996 |
/* Step Three: Process the Request */ |
1004 |
/* Step Three: Process the Request */ |
997 |
status = fcgi_do_request(p, r, backend, origin, dconf, uri, url, |
1005 |
status = fcgi_do_request(p, r, backend, origin, dconf, conf, uri, url, |
998 |
server_portstr); |
1006 |
server_portstr); |
999 |
|
1007 |
|
1000 |
cleanup: |
1008 |
cleanup: |