JBoss Native SVN: r1760 - trunk/build/patch.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-07-24 03:53:08 -0400 (Thu, 24 Jul 2008)
New Revision: 1760
Added:
trunk/build/patch/httpd-2.2.8.rhel.patch
Log:
Patch for the httpd rhel mod_proxy_ajp.c
Added: trunk/build/patch/httpd-2.2.8.rhel.patch
===================================================================
--- trunk/build/patch/httpd-2.2.8.rhel.patch (rev 0)
+++ trunk/build/patch/httpd-2.2.8.rhel.patch 2008-07-24 07:53:08 UTC (rev 1760)
@@ -0,0 +1,48 @@
+--- modules/proxy/mod_proxy_ajp.c 2008-07-24 09:31:12.000000000 +0200
++++ modules/proxy/mod_proxy_ajp.c 2008-07-24 09:37:02.000000000 +0200
+@@ -499,6 +499,8 @@
+ conn_rec *origin = NULL;
+ proxy_conn_rec *backend = NULL;
+ const char *scheme = "AJP";
++ apr_interval_time_t savetimeout;
++ char savetimeout_set;
+ proxy_dir_conf *dconf = ap_get_module_config(r->per_dir_config,
+ &proxy_module);
+
+@@ -554,7 +556,18 @@
+ goto cleanup;
+
+ /* Step Two: Make the Connection */
+- if (ap_proxy_connect_backend(scheme, backend, worker, r->server)) {
++ if (worker->ping_timeout_set) {
++ savetimeout_set = worker->timeout_set;
++ savetimeout = worker->timeout;
++ worker->timeout_set = 1;
++ worker->timeout = worker->ping_timeout;
++ }
++ status = ap_proxy_connect_backend(scheme, backend, worker, r->server);
++ if (worker->ping_timeout_set) {
++ worker->timeout_set = savetimeout_set;
++ worker->timeout = savetimeout;
++ }
++ if (status) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
+ "proxy: AJP: failed to make connection to backend: %s",
+ backend->hostname);
+@@ -564,6 +577,16 @@
+
+ /* Handle CPING/CPONG */
+ if (worker->ping_timeout_set) {
++ /* Put a timeout on the socket like ap_proxy_connect_backend() */
++ if (worker->timeout_set == 1) {
++ apr_socket_timeout_set(backend->sock, worker->timeout);
++ }
++ else if (conf->timeout_set == 1) {
++ apr_socket_timeout_set(backend->sock, conf->timeout);
++ }
++ else {
++ apr_socket_timeout_set(backend->sock, r->server->timeout);
++ }
+ status = ajp_handle_cping_cpong(backend->sock, r,
+ worker->ping_timeout);
+ if (status != APR_SUCCESS) {