perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject cvs commit: modperl-docs/src/docs/2.0/api/Apache Connection.pod
Date Tue, 02 Mar 2004 03:48:09 GMT
stas        2004/03/01 19:48:09

  Modified:    src/docs/2.0/api/Apache Connection.pod
  - update the keepalive entry
  - document the new keepalives entry
  Revision  Changes    Path
  1.4       +61 -2     modperl-docs/src/docs/2.0/api/Apache/Connection.pod
  Index: Connection.pod
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/Connection.pod,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- Connection.pod	26 Feb 2004 21:00:38 -0000	1.3
  +++ Connection.pod	2 Mar 2004 03:48:09 -0000	1.4
  @@ -150,15 +150,26 @@
   =head2 C<keepalive>
  -This method answers the question: Are we going to keep the connection
  -alive for another HTTP request? It's relevant only for HTTP requests.
  +This method answers the question: Should the the connection be kept
  +alive for another HTTP request after the current request is completed?
     $status = $c->keepalive();
  +  $status = $c->keepalive($new_status);
   =over 4
   =item arg1: C<$c> (C<L<Apache::Connection|docs::2.0::api::Apache::Connection>>)
  +=item arg2 opt: C<$new_status> (C<L<:conn_keepalive
  +Normally you should not mess with setting this option when handling
  +the HTTP protocol. If you do (for example when sending your own
  +headers set with
  +-- take a look at the ap_set_keepalive() function in
   =item ret: C<$status> (C<L<:conn_keepalive
  @@ -170,6 +181,9 @@
  +Unless you set this value yourself when implementing non-HTTP
  +protocols, it's only relevant for HTTP requests.
   For example:
     use Apache::RequestRec ();
  @@ -194,6 +208,51 @@
   Notice that new states could be added later by Apache, so your code
   should make no assumptions and do things only if the desired state
  +=head2 C<keepalives>
  +How many requests were already served over the current connection.
  +  $served = $c->keepalives();
  +  $served = $c->keepalives($new_served);
  +=over 4
  +=item arg1: C<$c> (C<L<Apache::Connection|docs::2.0::api::Apache::Connection>>)
  +=item arg1 opt: C<$new_served> (integer)
  +Set the number of served requests over the current
  +connection. Normally you won't do that when handling HTTP
  +requests. (But see below a note regarding
  +=item ret: C<$served> (integer)
  +How many requests were already served over the current connection.
  +In most handlers, but HTTP output filter handlers, that value doesn't
  +count the current request. For the latter it'll count the current
  +=item since: 1.99_13
  +This method is only relevant for L<keepalive|/C_keepalive_>
  +connections. The core connection output filter
  +C<ap_http_header_filter> increments this value when the response
  +headers are sent and it decides that the connection should not be
  +closed (see C<ap_set_keepalive()>).
  +If you send your own set of HTTP headers with
  +which includes the C<Keep-Alive> HTTP response header, you must make
  +sure to increment the C<keepalives> counter.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message