A quick search using SuperSearch for the term "keep_alive" turned up just a few threads... not a lot. I see that in this thread liz commented that not all HTTP servers support the keep_alive option. Are you sure yours does?

Also, most of the examples I find set keep_alive to 1, not undef.

Update: Looking into the Apache Webserver source provides some interesting information. At the following link you'll be able to look at just what is required before a connection can be kept alive: http://lxr.webperf.org/source.cgi/modules/http/http_protocol.c#206

The important part starts around line 206:

206 /*The following convoluted conditional determines whether or not 207 *the current connection should remain persistent after this respo +nse 208 *(a.k.a. HTTP Keep-Alive) and whether or not the output message 209 *body should use the HTTP/1.1 chunked transfer-coding. In English +, 210 * 211 * IF we have not marked this connection as errored; 212 * and the response body has a defined length due to the status c +ode 213 * being 304 or 204, the request method being HEAD, already 214 * having defined Content-Length or Transfer-Encoding: chunked, o +r 215 * the request version being HTTP/1.1 and thus capable of being s +et 216 * as chunked [we know the (r->chunked = 1) side-effect is ugly]; 217 * and the server configuration enables keep-alive; 218 * and the server configuration has a reasonable inter-request ti +meout; 219 * and there is no maximum # requests or the max hasn't been reac +hed; 220 * and the response status does not require a close; 221 * and the response generator has not already indicated close; 222 * and the client did not request non-persistence (Connection: cl +ose); 223 * and we haven't been configured to ignore the buggy twit 224 * or they're a buggy twit coming through a HTTP/1.1 proxy 225 * and the client is requesting an HTTP/1.0-style keep-alive 226 * or the client claims to be HTTP/1.1 compliant (perhaps a proxy +); 227 * THEN we can be persistent, which requires more headers be outp +ut. 228 * 229 *Note that the condition evaluation order is extremely important. 230 */

It appears that a number of criteria must be met for it to be possible to keep a session alive.

Based on the above link, I would suggest checking the following:

Hopefully that's enough to get you started.


Dave


"If I had my life to live over again, I'd be a plumber." -- Albert Einstein

In reply to Re: Keeping HTTP sessions alive by davido
in thread Keeping HTTP sessions alive by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.