[packages/apache] - rel 2; detect that children died and avoid doing dummy connection when unnecessary

arekm arekm at pld-linux.org
Mon Apr 15 14:29:54 CEST 2013


commit c7bf197641359dcd7c20d9cec5a09a21e9ca3ec6
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Apr 15 14:29:51 2013 +0200

    - rel 2; detect that children died and avoid doing dummy connection when unnecessary

 apache.spec                         |  5 ++++-
 httpd-dummy-connection-result.patch | 21 +++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)
---
diff --git a/apache.spec b/apache.spec
index ee30852..d312bc7 100644
--- a/apache.spec
+++ b/apache.spec
@@ -35,7 +35,7 @@ Summary(ru.UTF-8):	Самый популярный веб-сервер
 Summary(tr.UTF-8):	Lider WWW tarayıcı
 Name:		apache
 Version:	2.4.4
-Release:	1
+Release:	2
 License:	Apache v2.0
 Group:		Networking/Daemons/HTTP
 Source0:	http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
@@ -76,6 +76,7 @@ Patch1:		%{name}-layout.patch
 Patch2:		%{name}-suexec.patch
 Patch3:		%{name}-branding.patch
 Patch4:		%{name}-apr.patch
+Patch5:		httpd-dummy-connection-result.patch
 
 Patch7:		%{name}-syslibs.patch
 
@@ -2586,6 +2587,8 @@ Dwa programy testowe/przykładowe cgi: test-cgi and print-env.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
+
 %patch7 -p1
 
 %patch10 -p1
diff --git a/httpd-dummy-connection-result.patch b/httpd-dummy-connection-result.patch
new file mode 100644
index 0000000..b2c70cc
--- /dev/null
+++ b/httpd-dummy-connection-result.patch
@@ -0,0 +1,21 @@
+--- httpd-2.4.4.org/server/mpm_unix.c	2012-07-03 21:38:58.000000000 +0200
++++ httpd-2.4.4/server/mpm_unix.c	2013-04-15 14:27:54.197655418 +0200
+@@ -604,7 +604,17 @@
+         len = strlen(data);
+     }
+ 
+-    apr_socket_send(sock, data, &len);
++    rv = apr_socket_send(sock, data, &len);
++    if (rv == APR_SUCCESS && lp->protocol && strcasecmp(lp->protocol, "http") == 0) {
++        char *buffer[10]; // dummy buffer to see if child is alive
++
++        len = sizeof(buffer);
++        rv = apr_socket_recv(sock, buffer, &len);
++        if (rv != APR_SUCCESS) {
++            ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, ap_server_conf,
++                         "receiving response to dummy data to listener on %pI", lp->bind_addr);
++        }
++    }
+     apr_socket_close(sock);
+     apr_pool_destroy(p);
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/apache.git/commitdiff/c7bf197641359dcd7c20d9cec5a09a21e9ca3ec6



More information about the pld-cvs-commit mailing list