ruzz on symfony

v3. try 3. three. oh man. here we go again.

if you use sfWebBrowser

more specifically the sfCurlAdaptor.. I logged a bug tonight regarding it.

The gist of the problem is when the adaptor goes to build an http query string to put into the header it embeds ‘& amp;’ (forgive the space, tumblr.. sigh) rather than &.

this gives you some interesting results back from REST APIs like, say, tumblr’s—which just kept telling me i had a bad username or password.

this was a tricky one to figure out. I had to route curl (by setting curl proxy options) to port 8888 where i had fiddler listening, then passing it on. So I could compare the working POST and the broken POST to see what was different.

once i established that it was tough to say if this is a symfony bug, or sfCurlAdaptor bug, or a config expectation (issue).

in the end, i think that sfCurlAdaptor should be able to test, and recover from bad or not set ini values so I think the issue lies there and I logged it thus. Will anyone else agree? who knows.

anyways, the short term hack would be to either set your ini file arg_separator.output=’&’ or go on into sfCurlAdaptor and change:

curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($parameters));

to:

curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($parameters, ”, ‘&’));

and you should be good to go.