correct bug in empty post request process

This commit is contained in:
Eric German 2007-05-25 08:47:59 +00:00
parent 3772d213ae
commit 3076ab1deb
1 changed files with 7 additions and 3 deletions

View File

@ -24,7 +24,7 @@ use Sys::Hostname;
#use Data::Dumper;
#### common declaration #######
our( @ISA, $VERSION, @EXPORTS );
$VERSION = '3.2.0';
$VERSION = '3.3.0';
our $VERSION_LEMONLDAP = "3.1.0";
our $VERSION_INTERNAL = "3.1.0";
@ -730,9 +730,13 @@ s/$CONFIG{$ID_COLLECTED}->{MOTIFIN}/$CONFIG{$ID_COLLECTED}->{MOTIFOUT}/;
# copy POST data, if any
if ( $r->method eq 'POST' ) {
my $len = $r->headers_in->{'Content-length'};
my $buf;
my $len =0;
$len = $r->headers_in->{'Content-length'};
my $buf='';
if ($len < 0 ) { $len=0;}
if ($len > 0) {
$r->read( $buf, $len );
}
$request->content($buf);
$request->content_type( $r->headers_in->{'Content-Type'} );
}