dougm       01/04/02 02:06:07

  Added:       t/response/TestApache post.pm
  Log:
  start of extended apache test
  
  Revision  Changes    Path
  1.1                  modperl-2.0/t/response/TestApache/post.pm
  
  Index: post.pm
  ===================================================================
  package TestApache::post;
  
  use strict;
  use warnings FATAL => 'all';
  
  use APR::Table ();
  
  sub read_post {
      my $r = shift;
  
      $r->setup_client_block;
  
      return undef unless $r->should_client_block;
  
      my $len = $r->headers_in->get('content-length');
  
      my $buf;
      $r->get_client_block($buf, $len);
  
      return $buf;
  }
  
  sub handler {
      my $r = shift;
      $r->content_type('text/plain');
  
      my $data = read_post($r) || "";
  
      $r->puts(join ':', length($data), $data);
  
      0;
  }
  
  1;
  
  
  

Reply via email to