0

I have the following setting for IE in my httpd.conf:

BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0

I want to apply this to all requests that hit my server.

My httpd.conf section that deals with keep alive looks like this:

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 5

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 1

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 1

How do I do this?

2
  • You should be able to do that in the server global or VirtualHost configuration, no?
    – adric
    Aug 14, 2013 at 16:49
  • that definitely should disable keepalives... It's not being turned on again somewhere else?
    – voretaq7
    Aug 14, 2013 at 20:50

1 Answer 1

3

If you want to disable HTTP keep-alive for all browsers just set KeepAlive to off globally.

No sense wasting resources on a BrowserMatch if you don't have to, but if you really want to use BrowserMatch just compose a regular expression that matches anything. ".*" is a good one.

6
  • KeepAlive was already set to off. Does the client need to do something to stop receiving a connection state of keep-alive after a http get is invoked?
    – petey
    Aug 14, 2013 at 18:57
  • If KeepAlive is Off and not overridden anywhere else then keep-alives should simply not work. I suspect there's more to this that you're not telling us -- what specifically are you trying to accomplish?
    – voretaq7
    Aug 14, 2013 at 20:13
  • I have a client trying to do a get against a service I have. It just returns a few characters. I have posted all the parameters concerning the keep alive in the question above.
    – petey
    Aug 14, 2013 at 20:37
  • hmm... I'm not sure Keepalive is your problem, but you certainly appear to have it turned off. You can use my notes above to set HTTP/1.0 for all browsers and see if that helps. If not there may be something else going on...
    – voretaq7
    Aug 14, 2013 at 20:52
  • 1
    I set MaxKeepAliveRequests to 0 and KeepAlive now stays off.
    – petey
    Aug 14, 2013 at 22:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .