httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gben...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestRequest.pm
Date Wed, 06 Nov 2002 12:28:09 GMT
gbenson     2002/11/06 04:28:09

  Modified:    perl-framework/Apache-Test/lib/Apache TestRequest.pm
  Log:
  Content-length headers don't seem to get added to POST requests with
  empty bodies, causing httpd to return a 411 Length Required.
  
  Revision  Changes    Path
  1.73      +3 -0      httpd-test/perl-framework/Apache-Test/lib/Apache/TestRequest.pm
  
  Index: TestRequest.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRequest.pm,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- TestRequest.pm	18 Sep 2002 21:14:58 -0000	1.72
  +++ TestRequest.pm	6 Nov 2002 12:28:09 -0000	1.73
  @@ -386,6 +386,9 @@
   
       unless ($shortcut) {
           #GET, HEAD, POST
  +        if ($r->method eq "POST" && !defined($r->header("Content-Length")))
{
  +            $r->header('Content-Length' => length($r->content));
  +        }
           $r = $UA ? $UA->request($r) : $r;
           my $proto = $r->protocol;
           if (defined($proto)) {
  
  
  

Mime
View raw message