Skip auth when no credentials are found

If we can’t find a credential for the current host, even if it required login, we won’t add them and website will be fetched without any login.
This commit is contained in:
Jeremy Benoist
2017-05-09 22:25:18 +02:00
parent 0eb8220204
commit 94b232bbb8
5 changed files with 59 additions and 23 deletions

View File

@ -51,6 +51,7 @@ class HttpClientFactory
$this->cookieJar->clear();
// need to set the (shared) cookie jar
$client = new Client(['handler' => new SafeCurlHandler(), 'defaults' => ['cookies' => $this->cookieJar]]);
foreach ($this->subscribers as $subscriber) {
$client->getEmitter()->attach($subscriber);
}