Skip to content
This repository

Zend\Http\Client does not support input streams #2645

adamlundrigan opened this Issue · 4 comments

5 participants

Adam Lundrigan gullij Ralph Schindler ClemensSahs Enrico Zimuel
Adam Lundrigan

In ZF1, Zend_Http_Client supported input streams for PUT

$fp = file_open("", 'r');
$client->setRawData($fp, 'application/zip')->request('PUT');

This functionality no longer exists in ZF2 Zend\Http\Client, as ::setRawBody just proxies to Zend\Stdlib\Message::setContent, which only supports string-able input (scalars or objects with a __toString)


Is this ever getting fixed? This also causes the same error when trying to use the ZendGData classes to upload movies to YouTube.

I have no idea how to link this properly so here's the URL:


gullij gullij referenced this issue in zendframework/ZendGData

zendgdata is not compatible with zend-http #6

Ralph Schindler

@ezimuel Thoughts?


i work with this methode

$fp = fopen("", 'r');
$request->setContent( $fp );

// php5.3
$fileStat = fstat($fp);

// php5.4

$response = $client->send($request);

// alternativ

$fp = fopen("", 'r');
$fileStat = fstat($fp);


is this issue done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.