Hi,

I am not sure this is the proper list to send bug reports to, but
nevertheless:


--- POE/Filter/HTTPD.pm Tue Dec 26 07:14:12 2000
+++ /usr/local/lib/perl5/site_perl/5.005/POE/Filter/HTTPD.pm    Tue Jul 17 16:35:29 
+2001
@@ -45,7 +45,6 @@
   if($self->{header}) {
     my $buf = $self->{buffer};
     my $r = $self->{header};
-    $buf =~s/.*(\x0D\x0A?\x0D\x0A?|\x0A\x0D?\x0A\x0D?)//s;
     if(length($buf) >= $r->content_length()) {
       $r->content($buf);
       $self->{finish}++;
@@ -64,6 +63,7 @@
     unless($self->{buffer} =~/(\x0D\x0A?\x0D\x0A?|\x0A\x0D?\x0A\x0D?)/s);
 
   my $buf = $self->{buffer};
+  $self->{buffer} =~s/.*?(\x0D\x0A?\x0D\x0A?|\x0A\x0D?\x0A\x0D?)//s;
 
 
Bug explanation:  for sufficiently large POST requests provided that
content contained consequtive newlines, the repeatable deletion of the
content data occurred;  thus, the content_length bytes of data were
never read from the network (assuming the correct request).

The fix, obviously, removes the header chunk from the accumulated buffer
only once, as soon as the end of the header has been detected.

=Anton.
-- 
May the tuna salad be with you.

Reply via email to