Lines 1764-1769
static int proxy_http_handler(request_re
Link Here
|
1764 |
const char *u; |
1764 |
const char *u; |
1765 |
proxy_conn_rec *backend = NULL; |
1765 |
proxy_conn_rec *backend = NULL; |
1766 |
int is_ssl = 0; |
1766 |
int is_ssl = 0; |
|
|
1767 |
int retry_count = 2; |
1767 |
|
1768 |
|
1768 |
/* Note: Memory pool allocation. |
1769 |
/* Note: Memory pool allocation. |
1769 |
* A downstream keepalive connection is always connected to the existence |
1770 |
* A downstream keepalive connection is always connected to the existence |
Lines 1840-1871
static int proxy_http_handler(request_re
Link Here
|
1840 |
sizeof(server_portstr))) != OK) |
1841 |
sizeof(server_portstr))) != OK) |
1841 |
goto cleanup; |
1842 |
goto cleanup; |
1842 |
|
1843 |
|
1843 |
/* Step Two: Make the Connection */ |
1844 |
while (retry_count--) { |
1844 |
if (ap_proxy_connect_backend(proxy_function, backend, worker, r->server)) { |
1845 |
/* Step Two: Make the Connection */ |
1845 |
if (r->proxyreq == PROXYREQ_PROXY) |
1846 |
if (ap_proxy_connect_backend(proxy_function, backend, worker, r->server)) { |
1846 |
status = HTTP_NOT_FOUND; |
1847 |
if (r->proxyreq == PROXYREQ_PROXY) |
1847 |
else |
1848 |
status = HTTP_NOT_FOUND; |
1848 |
status = HTTP_SERVICE_UNAVAILABLE; |
1849 |
else |
1849 |
goto cleanup; |
1850 |
status = HTTP_SERVICE_UNAVAILABLE; |
1850 |
} |
1851 |
break; |
|
|
1852 |
} |
1851 |
|
1853 |
|
1852 |
/* Step Three: Create conn_rec */ |
1854 |
/* Step Three: Create conn_rec */ |
1853 |
if (!backend->connection) { |
1855 |
if (!backend->connection) { |
1854 |
if ((status = ap_proxy_connection_create(proxy_function, backend, |
1856 |
if ((status = ap_proxy_connection_create(proxy_function, backend, |
1855 |
c, r->server)) != OK) |
1857 |
c, r->server)) != OK) |
1856 |
goto cleanup; |
1858 |
break; |
1857 |
} |
1859 |
} |
1858 |
|
1860 |
|
1859 |
/* Step Four: Send the Request */ |
1861 |
/* Step Four: Send the Request */ |
1860 |
if ((status = ap_proxy_http_request(p, r, backend, backend->connection, |
1862 |
if ((status = ap_proxy_http_request(p, r, backend, backend->connection, |
1861 |
conf, uri, url, server_portstr)) != OK) |
1863 |
conf, uri, url, server_portstr)) != OK) |
1862 |
goto cleanup; |
1864 |
break; |
1863 |
|
1865 |
|
1864 |
/* Step Five: Receive the Response */ |
1866 |
/* Step Five: Receive the Response */ |
1865 |
if ((status = ap_proxy_http_process_response(p, r, backend, |
1867 |
if ((status = ap_proxy_http_process_response(p, r, backend, |
1866 |
backend->connection, |
1868 |
backend->connection, |
1867 |
conf, server_portstr)) != OK) |
1869 |
conf, server_portstr)) != APR_EOF |
1868 |
goto cleanup; |
1870 |
&& status != APR_ECONNRESET) |
|
|
1871 |
break; |
1872 |
} |
1869 |
|
1873 |
|
1870 |
/* Step Six: Clean Up */ |
1874 |
/* Step Six: Clean Up */ |
1871 |
|
1875 |
|