You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Colm MacCarthaigh <co...@heanet.ie> on 2003/01/09 06:05:26 UTC

[dwmalone@maths.tcd.ie: Quick apapche patch.]

heads up on the inconsistency :)

----- Forwarded message from David Malone <dw...@maths.tcd.ie> -----

Delivery-date: Tue, 07 Jan 2003 16:47:43 +0000
To: colm.maccarthaigh@heanet.ie
Subject: Quick apache patch.
From: David Malone <dw...@maths.tcd.ie>

In Apache 1.3 the accept filter name for recent versions of FreeBSD
is set to "httpready" and for older versions it is set to "dataready".
In Apache 2.0 it always seems to be set to "dataready" - I've been
binary-editing my Apache compiles to change it, but the patch below
would make Apache 2.0 do the same thing as Apache 1.3.

(If you want to inspect the code in 1.3, it is in src/main/http_main.c,
search for ACCEPT_FILTER_NAME).

	David.

--- /src/info-systems/httpd-2.0.43/server/listen.c.orig	Tue Jan  7 16:13:53 2003
+++ /src/info-systems/httpd-2.0.43/server/listen.c	Tue Jan  7 16:16:09 2003
@@ -184,7 +184,13 @@
 
 #if APR_HAS_SO_ACCEPTFILTER
 #ifndef ACCEPT_FILTER_NAME
+#define ACCEPT_FILTER_NAME "httpready"
+#ifdef __FreeBSD_version
+#if __FreeBSD_version < 411000 /* httpready broken before 4.1.1 */
+#undef ACCEPT_FILTER_NAME
 #define ACCEPT_FILTER_NAME "dataready"
+#endif
+#endif
 #endif
     apr_socket_accept_filter(s, ACCEPT_FILTER_NAME, "");
 #endif


----- End forwarded message -----

-- 
Colm MacCárthaigh  /   HEAnet, Brooklawn House,     /     Network Engineer
+353 1 6609040    /  Shelbourne Road, Dublin, IE   /   http://www.hea.net/

Re: [dwmalone@maths.tcd.ie: Quick apapche patch.]

Posted by Justin Erenkrantz <je...@apache.org>.
--On Thursday, January 9, 2003 5:05 AM +0000 Colm MacCarthaigh 
<co...@heanet.ie> wrote:

> --- /src/info-systems/httpd-2.0.43/server/listen.c.orig	Tue Jan  7
> 16:13:53 2003 +++ /src/info-systems/httpd-2.0.43/server/listen.c
> 	Tue Jan  7 16:16:09 2003 @@ -184,7 +184,13 @@
>
>  #if APR_HAS_SO_ACCEPTFILTER
>  #ifndef ACCEPT_FILTER_NAME
> +#define ACCEPT_FILTER_NAME "httpready"
> +#ifdef __FreeBSD_version
> +#if __FreeBSD_version < 411000 /* httpready broken before 4.1.1 */
> +#undef ACCEPT_FILTER_NAME
>  #define ACCEPT_FILTER_NAME "dataready"
> +#endif
> +#endif
>  #endif
>      apr_socket_accept_filter(s, ACCEPT_FILTER_NAME, "");
>  #endif

Wouldn't this make more sense as an autoconf test?  I don't really 
have access to a FreeBSD machine, but certainly this seems like 
something we could check/define at configure-time rather than 
cluttering up the code with more #define's.  -- justin