# HG changeset patch # User Francois-Xavier MAURICARD # Date 1266504795 -3600 # Node ID ba7b9bf77c1d233fdaff023cd75a5ce16d4a3e0d # Parent 0e10e04690c1b2c92161afb36871a7c48121c521 Fix Zend_Http_Client when using with 'php://output' stream. diff --git a/library/Zend/Http/Client.php b/library/Zend/Http/Client.php --- a/library/Zend/Http/Client.php +++ b/library/Zend/Http/Client.php @@ -75,7 +75,7 @@ class Zend_Http_Client const DELETE = 'DELETE'; const TRACE = 'TRACE'; const OPTIONS = 'OPTIONS'; - const CONNECT = 'CONNECT'; + const CONNECT = 'CONNECT'; const MERGE = 'MERGE'; /** @@ -993,7 +993,10 @@ class Zend_Http_Client } if($this->config['output_stream']) { - rewind($stream); + $streamMetaData = stream_get_meta_data($stream); + if ($streamMetaData['seekable']) { + rewind($stream); + } // cleanup the adapter $this->adapter->setOutputStream(null); $response = Zend_Http_Response_Stream::fromStream($response, $stream);