Skip to content

fix wrong default settings passing #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

VoDmAl
Copy link

@VoDmAl VoDmAl commented Nov 1, 2016

No description provided.

@JimmyRittenborg
Copy link

Sorry can you elaborate more on this one, maybe leave en example? ☺️

@VoDmAl
Copy link
Author

VoDmAl commented Nov 2, 2016

Hi @JimmyRittenborg,

Yep. I found mistake with passing default settings as nested array with key "defaults". As far as i can see it is not used in current versions of guzzlehttp (downloaded via composer as the project's dependency).
May be this is the reason why I see duplicate of passing "allow_redirects" in each request in "doRequest"
$requestOptions = array( ... 'allow_redirects' => false, ... );
I found this bug when tried to pass 'verify' => false and used getClient() as example to create my own instance.
This will not work with my self-signed certificate site:
$client->setClient(new \GuzzleHttp\Client(['defaults' => ['allow_redirects' => false, 'cookies' => true, 'verify' => false]]));
This will work:
$client->setClient(new \GuzzleHttp\Client(['allow_redirects' => false, 'cookies' => true, 'verify' => false]));

@JimmyRittenborg
Copy link

JimmyRittenborg commented Nov 2, 2016

Thank you for describing this. Though this repo is just a fork of the original https://github.com/FriendsOfPHP/Goutte but makes it possible to use Goutte with the FileCookieJar from Guzzle. So if you don't need that, you could just pull the original repo and maybe make the PR over there? :)

@VoDmAl
Copy link
Author

VoDmAl commented Nov 4, 2016

Yep. But I took your fork as it is ahead of original. And the original repo does not look alive now. A bunch of opened pull requests. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants