This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.1 » sfWebBrowser and sfCurlAdapter redirection support
sfWebBrowser and sfCurlAdapter redirection support [message #102494] Wed, 14 July 2010 23:02 Go to next message
arsenik7  is currently offline arsenik7
Messages: 53
Registered: October 2006
Location: France
Member

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,
Re: sfWebBrowser and sfCurlAdapter redirection support [message #102820 is a reply to message #102494 ] Tue, 20 July 2010 19:08 Go to previous message
arsenik7  is currently offline arsenik7
Messages: 53
Registered: October 2006
Location: France
Member

Please, let me know if you don't understand my issue Rolling Eyes
Previous Topic:Validation / sfValidatorPropelUnique
Next Topic:sfDoctrineGuardPlugin and php5.1.6
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software