Issues

ZF-9410: Make Zend_OAuth Http Client support streams

Description

Hi there,

I discovered this issue while trying to upload a video to Youtube with an authenticated oAuth HTTP client. When you have an oAuth http Client and try to upload a video, the application crashes with message:

Application error Exception information:

Message: Method does not exist: setRawDataStream

Hacking a little bit I discovered Youtube object expects a GData Http Client, which has the method setRawDataStream.

I solved this issue copying some methods from /Zend/GData/HttpClient.php to /Zend/OAuth/Client.php. Now OAuth client supports video upload without crashing.

Where can I send the modified file to your revision?

Comments

It's the modified version of /Zend/OAuth/Client.php with new classes.

Thanks for the report. Can you do me a favour? Just need to understand how you are using OAuth in this scenario. As you substituting the GData client with an OAuth Client, for example? If you can confirm this, I'll take a look at how the GData client operates, and look into porting over any changes as you suggest in your patch.

Thanks!

Hi Mr. Brady,

Yes, it's exactly like that. I'm using OAuth Client instead of GData Client. For some reason, I couldn't authenticate with Authsub using GData (I only successfully authenticate with ClientLogin), so I managed to do it with OAuth.

When I get the Access Key, I can generate a Http Client with it, but this client couldn't upload videos because it doesn't had some methods that GData client has.

To resolve this question, it's only a matter of copying carefully some methods from GData client (/Zend/GData/HttpClient.php) to OAuth client (/Zend/OAuth/Client.php).

Best wishes, Rafael

Implemented in r22036 ;).

I'll update the OAuth docs for this new feature support at a later date.