conditional keep alive

Hello,

does anyone know how to configure apache for a conditional keepAlive
pconn

something like

<if header contains XYZ>

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

</end header contains ZYX>
mazzawi [ Fr, 04 Januar 2008 19:36 ] [ ID #1899755 ]

Re: conditional keep alive

mazzawi [at] gmail.com wrote:
> does anyone know how to configure apache for a conditional keepAlive
> pconn
>
> something like
>
> <if header contains XYZ>
> KeepAlive On
> MaxKeepAliveRequests 100
> KeepAliveTimeout 15
> </end header contains ZYX>

the special-purpose environment variable 'nokeepalive' can be conditionally set
to disable keepalive connections.

http://httpd.apache.org/docs/2.2/env.html#special

this example uses browsermatch to turn off keepalive for buggy browsers, you
could apply this special-purpose environment variable to other tests:

<IfModule mod_setenvif.c>
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
</IfModule>

hth
-sean

--
sean dreilinger - http://durak.org/sean/
sean dreilinger [ Fr, 04 Januar 2008 20:39 ] [ ID #1899758 ]

Re: conditional keep alive

thanks sean

so what i need is to turn off keep alive if a special http header is
missing say AK=1
browserMatch only works on HTTP_USER_AGENT i need something to match a
custom header

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

if special header is missing: nokeepalive
mazzawi [ Fr, 04 Januar 2008 21:09 ] [ ID #1899759 ]
Webserver » alt.apache.configuration » conditional keep alive

Vorheriges Thema: .htaccess file
Nächstes Thema: commands to set up a second apache to act as http server?