Issue Type: Bug Created: 2012-11-27T16:26:22.000+0000 Last Updated: 2013-04-05T16:07:08.000+0000 Status: Closed Fix version(s): Reporter: Chris Grice (chrisgrice) Assignee: Trevor Johns (tjohns) Tags: - Zend_Gdata
Related issues: Attachments:
When using Zend_Gdata to upload to youtube while behind a proxy, Zend_Gdata_HttpAdapterStreamingProxy throws a fatal error:
Fatal error: Call to undefined method Zend_Gdata_MediaMimeStream::hasData() in Zend/Gdata/HttpAdapterStreamingProxy.php on line 118
Using the implementation of the same functionality in Zend_Gdata_HttpAdapterStreamingSocket the upload completes successfully.
I.e replacing the lines from 118 to 124:
while ($body->hasData()) {
if (! @fwrite($this->socket, $body->read(self::CHUNK_SIZE))) {
require_once 'Zend/Http/Client/Adapter/Exception.php';
throw new Zend_Http_Client_Adapter_Exception(
'Error writing request to server');
}
}
with the following:
$chunk = $body->read(self::CHUNK_SIZE);
while ($chunk !== FALSE) {
if (! @fwrite($this->socket, $chunk)) {
require_once 'Zend/Http/Client/Adapter/Exception.php';
throw new Zend_Http_Client_Adapter_Exception(
'Error writing request to server');
}
$chunk = $body->read(self::CHUNK_SIZE);
}
$body->closeFileHandle();
fixes the issue.
Posted by Ralph Schindler (ralph) on 2013-04-05T16:07:08.000+0000
This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf1/issues/36