httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r111596 - /httpd/httpd/trunk/CHANGES /httpd/httpd/trunk/server/listen.c
Date Sat, 11 Dec 2004 09:53:17 GMT
Author: pquerna
Date: Sat Dec 11 01:53:16 2004
New Revision: 111596

URL: http://svn.apache.org/viewcvs?view=rev&rev=111596
Log:
* Add bits to use APR_TCP_DEFER_ACCEPT
* Log Warnings when adding defer accept or an accept filter fails.

Modified:
   httpd/httpd/trunk/CHANGES
   httpd/httpd/trunk/server/listen.c

Modified: httpd/httpd/trunk/CHANGES
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/CHANGES?view=diff&rev=111596&p1=httpd/httpd/trunk/CHANGES&r1=111595&p2=httpd/httpd/trunk/CHANGES&r2=111596
==============================================================================
--- httpd/httpd/trunk/CHANGES	(original)
+++ httpd/httpd/trunk/CHANGES	Sat Dec 11 01:53:16 2004
@@ -2,6 +2,10 @@
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) core: Add support for APR_TCP_DEFER_ACCEPT to defer accepting
+     of a connection until data is available.
+     [Paul Querna]
+
   *) conf: Remove AddDefaultCharset from the default configuration because
      setting a site-wide default does more harm than good. PR 23421.
      [Roy Fielding]

Modified: httpd/httpd/trunk/server/listen.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/listen.c?view=diff&rev=111596&p1=httpd/httpd/trunk/server/listen.c&r1=111595&p2=httpd/httpd/trunk/server/listen.c&r2=111596
==============================================================================
--- httpd/httpd/trunk/server/listen.c	(original)
+++ httpd/httpd/trunk/server/listen.c	Sat Dec 11 01:53:16 2004
@@ -164,7 +164,20 @@
 #endif
 #endif
 #endif
-    apr_socket_accept_filter(s, ACCEPT_FILTER_NAME, "");
+    stat = apr_socket_accept_filter(s, ACCEPT_FILTER_NAME, "");
+    if (stat != APR_SUCCESS && !APR_STATUS_IS_ENOTIMPL(stat)) {
+        ap_log_perror(APLOG_MARK, APLOG_WARNING, stat, p,
+                      "Failed to enable the '%s' Accept Filter",
+                      ACCEPT_FILTER_NAME);
+    }
+#else
+#ifdef APR_TCP_DEFER_ACCEPT
+    stat = apr_socket_opt_set(s, APR_TCP_DEFER_ACCEPT, 1);   
+    if (stat != APR_SUCCESS && !APR_STATUS_IS_ENOTIMPL(stat)) {
+        ap_log_perror(APLOG_MARK, APLOG_WARNING, stat, p,
+                              "Failed to enable APR_TCP_DEFER_ACCEPT");
+    }
+#endif
 #endif
 
     server->sd = s;

Mime
View raw message