X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FFastCGI.pm;h=9a74c1793ff596c3c887e03cae8cc9a3bbbc87be;hb=e512dd249ef1911d256f91f39ea5beaad85f73a9;hp=1ac5a3540ff01df47594e2cab7f2f9cdbcd3468c;hpb=85d9fce671016c9040775c8b4458cf9c72ec2208;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine/FastCGI.pm b/lib/Catalyst/Engine/FastCGI.pm index 1ac5a35..9a74c17 100644 --- a/lib/Catalyst/Engine/FastCGI.pm +++ b/lib/Catalyst/Engine/FastCGI.pm @@ -159,6 +159,15 @@ sub write { $self->prepare_write($c); $self->{_prepared_write} = 1; } + + # XXX: We can't use Engine's write() method because syswrite + # appears to return bogus values instead of the number of bytes + # written: http://www.fastcgi.com/om_archive/mail-archive/0128.html + + # Prepend the headers if they have not yet been sent + if ( my $headers = delete $self->{_header_buf} ) { + $buffer = $headers . $buffer; + } # FastCGI does not stream data properly if using 'print $handle', # but a syswrite appears to work properly.