ZF-10197: Zend Http Client problem with Delicious Oauth signature
I implemented the yahoo Oauth login for delicious with Zend_Oauth. All is working as expected as long as there are no spaces in the description parameter. As soon as there is a space in the description a signature error is returned from yahoo.
The problem is, that Zend_Oauth_Client (or Zend_Http_Client) uses http_build_query to create the query. http_build_query replaces all spaces with + instead of %20. So the signature created by the server is not the same as created by the client.
The bug can be fixed by adding the following on line 959 (Zend_Http_Client).
$query .= http_build_query($this->paramsGet, null, '&'); $query = str_replace('+','%20',$query);
I'm not sure if this will break other requests or what could be a better way to implement it. At the moment I created a additional socket adapter the does the replacing because I'm able to inject the adapter into the client.
More about the problem here in this thread on the bottom: http://support.delicious.com/forum/comments.php/…