slackbuilds_ponce/perl/perl-SOAP-Lite/SOAP-Lite-0.712_sysread.patch
dsomero 422df92bd6 perl/perl-SOAP-Lite: Added (SOAP::Lite module)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
2011-04-11 00:10:58 -05:00

38 lines
1.3 KiB
Diff

From 8f49c0e970261f59bc043a8104a9a730ec69dcf4 Mon Sep 17 00:00:00 2001
From: Christian Ruppert <idl0r@gentoo.org>
Date: Wed, 23 Mar 2011 18:04:19 +0100
Subject: [PATCH] Use read() instead of sysread() when using mod_perl
https://rt.cpan.org/Public/Bug/Display.html?id=58538
---
lib/SOAP/Transport/HTTP.pm | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/lib/SOAP/Transport/HTTP.pm b/lib/SOAP/Transport/HTTP.pm
index f16b990..57ebbf3 100644
--- a/lib/SOAP/Transport/HTTP.pm
+++ b/lib/SOAP/Transport/HTTP.pm
@@ -566,9 +566,17 @@ sub handle {
if ( !$chunked ) {
my $buffer;
binmode(STDIN);
- while ( sysread( STDIN, $buffer, $length ) ) {
- $content .= $buffer;
- last if ( length($content) >= $length );
+ if ( defined($ENV{"MOD_PERL"}) ) {
+ while ( read( STDIN, $buffer, $length ) ) {
+ $content .= $buffer;
+ last if ( length($content) >= $length );
+ }
+ }
+ else {
+ while ( sysread( STDIN, $buffer, $length ) ) {
+ $content .= $buffer;
+ last if ( length($content) >= $length );
+ }
}
}
--
1.7.3.4