This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

sfWebBrowser and sfCurlAdapter redirection support

Discussion specific to symfony 1.1.x stable

sfWebBrowser and sfCurlAdapter redirection support

by arsenik7 » Wed Jul 14, 2010 11:02 pm

Hi ,

I use sfWebBrowser like this :

$wbrowser = new sfWebBrowser(array(), 'sfCurlAdapter', array(
'followlocation' => false,
));

So, as you can see I dont want to follow redirection.

In curl adapteur the opt CURLOPT_FOLLOWLOCATION is set to false.

The problem is line 219 from sfWebBrowser.class.php.

The redirection is made even if CURLOPT_FOLLOWLOCATION is set to false.

So, there is something i don't understand, or there is an error in this if statement:
if ((in_array($browser->getResponseCode(), array(301, 307)) && in_array($method, array('GET', 'HEAD'))) || in_array($browser->getResponseCode(), array(302,303)))

What do you think ?


I use symfony 1.1.6 and sfWebBrowserPlugin 1.1.2.




Thank you,
arsenik7
Member
 
Posts: 53
Joined: Fri Oct 13, 2006 9:34 am
Location: France

Re: sfWebBrowser and sfCurlAdapter redirection support

by arsenik7 » Tue Jul 20, 2010 7:08 pm

Please, let me know if you don't understand my issue :roll:
arsenik7
Member
 
Posts: 53
Joined: Fri Oct 13, 2006 9:34 am
Location: France