[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-test-cvs
Subject: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestRequest.pm
From: gbenson () apache ! org
Date: 2002-11-06 12:28:09
[Download RAW message or body]
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)) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic