perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@locus.apache.org
Subject cvs commit: modperl/src/modules/perl mod_perl.c
Date Tue, 03 Oct 2000 16:13:03 GMT
dougm       00/10/03 09:13:02

  Modified:    .        ToDo Changes
               Apache   Apache.pm
               src/modules/perl mod_perl.c
  Log:
  add proper offset support to Apache::read
  
  Revision  Changes    Path
  1.265     +2 -3      modperl/ToDo
  
  Index: ToDo
  ===================================================================
  RCS file: /home/cvs/modperl/ToDo,v
  retrieving revision 1.264
  retrieving revision 1.265
  diff -u -r1.264 -r1.265
  --- ToDo	2000/10/03 14:17:22	1.264
  +++ ToDo	2000/10/03 16:12:55	1.265
  @@ -12,14 +12,13 @@
   - segfaults with DBI->connect (mysql), reported that downgrade to
     1.21_03 cures
   
  -- Apache::read() does not clear $_[1] before appending data, bug or feature?
  -  [Cyrus Rahman <cr@jcmax.com>]
  -
   - {get,set}_handlers troubles [Geoffrey Young <gyoung@laserlink.net>]
     see also: http://perl.apache.org/~dougm/set_handlers.pat
   
   - remove eg/ directory, it's way out of date and no longer needed now
     with the guide, the books, and piles of Apache::* modules
  +
  +- add $r->set_keepalive method?
   
   ---------------------------------------------------------------------------
   POSSIBLE NEW FEATURES
  
  
  
  1.543     +2 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.542
  retrieving revision 1.543
  diff -u -r1.542 -r1.543
  --- Changes	2000/10/03 14:17:22	1.542
  +++ Changes	2000/10/03 16:12:56	1.543
  @@ -10,6 +10,8 @@
   
   =item 1.24_01-dev
   
  +add proper offset support to Apache::read
  +
   config/test fixups for libapreq/win32
   [Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
   
  
  
  
  1.55      +14 -7     modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===================================================================
  RCS file: /home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- Apache.pm	2000/09/28 16:19:56	1.54
  +++ Apache.pm	2000/10/03 16:12:58	1.55
  @@ -20,7 +20,7 @@
   
   {
       no strict;
  -    $VERSION = "1.26";
  +    $VERSION = "1.27";
       __PACKAGE__->mod_perl::boot($VERSION);
   }
   
  @@ -61,12 +61,11 @@
   *READ = \&read unless defined &READ;
   
   sub read {
  -    my($r, $bufsiz) = @_[0,2];
  +    my($r, $bufsiz, $offset) = @_[0,2,3];
       my($nrd, $buf, $total);
       $nrd = $total = 0;
       $buf = "";
  -    $_[1] ||= "";
  -    #$_[1] = " " x $bufsiz unless defined $_[1]; #XXX?
  +    $_[1] = "" unless $offset;
   
       $r->soft_timeout("Apache->read");
   
  @@ -74,8 +73,13 @@
   	$nrd = $r->read_client_block($buf, $bufsiz) || 0;
   	if(defined $nrd and $nrd > 0) {
   	    $bufsiz -= $nrd;
  -	    $_[1] .= $buf;
  - 	    #substr($_[1], $total, $nrd) = $buf;
  +            if ($offset) {
  +                substr($_[1], $offset) .= $buf;
  +                #$_[1] .= $buf;
  +            }
  +            else {
  +                $_[1] .= $buf;
  +            }
   	    $total += $nrd;
   	    next if $bufsiz;
   	    last;
  @@ -420,10 +424,13 @@
   I<value> pairs are returned.  *NOTE*: you can only ask for this once,
   as the entire body is read from the client.
   
  -=item $r->read($buf, $bytes_to_read)
  +=item $r->read($buf, $bytes_to_read, [$offset])
   
   This method is used to read data from the client, 
   looping until it gets all of C<$bytes_to_read> or a timeout happens.
  +
  +An offset may be specified to place the read data at some other place
  +than the beginning of the string.
   
   In addition, this method sets a timeout before reading with
   C<$r-E<gt>soft_timeout>.
  
  
  
  1.131     +1 -1      modperl/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v
  retrieving revision 1.130
  retrieving revision 1.131
  diff -u -r1.130 -r1.131
  --- mod_perl.c	2000/09/29 16:33:40	1.130
  +++ mod_perl.c	2000/10/03 16:13:01	1.131
  @@ -524,7 +524,7 @@
       if(!PERL_IS_DSO) \
           register_cleanup(p, NULL, mp_server_notstarting, mod_perl_noop) 
   
  -#define MP_APACHE_VERSION "1.26"
  +#define MP_APACHE_VERSION "1.27"
   
   void mp_check_version(void)
   {
  
  
  

Mime
View raw message