#59 Failure to read() long requests under mod_perl

0.60
closed
Martin Kutter
Transport (26)
7
2007-10-30
2004-11-25
No

SOAP::Lite has a bug which prevents it to read long
requests under mod_perl.

In handler sub, at line 459, there is the following code:

$self->request(HTTP::Request->new(
$r->method => $r->uri,
HTTP::Headers->new($r->headers_in),
do { my $buf; $r->read($buf,
$r->header_in('Content-length')); $buf; }
));

As can be seen, it performs read() only once. However,
read() may return less data than requested. In case of
our mod_perl environment, read() returns maximum of
8000 bytes.

The code needs to be changed so that read() result is
checked, and if less data is returned than stated in
$r->header_in('Content-length'), additional read()
calls are made until all data is read.

After we made such change we didn't have problems with
large requests anymore.

Discussion

  • Martin Kutter
    Martin Kutter
    2007-10-04

    • priority: 5 --> 7
     
  • Martin Kutter
    Martin Kutter
    2007-10-30

    • assigned_to: byrnereese --> kutterma
    • status: open --> closed
     
  • Martin Kutter
    Martin Kutter
    2007-10-30

    Logged In: YES
    user_id=884175
    Originator: NO

    Already fixed for mod_perl, now fixed for CGI, too