aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Helper
diff options
context:
space:
mode:
authoradev <adev2000@gmail.com>2017-11-12 12:15:02 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-05-28 11:42:27 +0200
commit1048c9c4a811821b00cc04bfec905bebcc22bac4 (patch)
treee1897ef094ecda927f3fcf7ffce33a0d7772f4a9 /src/Wallabag/CoreBundle/Helper
parent5f08426201c336f96d593954fb45b284d7e60f4a (diff)
downloadwallabag-1048c9c4a811821b00cc04bfec905bebcc22bac4.tar.gz
wallabag-1048c9c4a811821b00cc04bfec905bebcc22bac4.tar.zst
wallabag-1048c9c4a811821b00cc04bfec905bebcc22bac4.zip
Configure timeout
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper')
-rw-r--r--src/Wallabag/CoreBundle/Helper/HttpClientFactory.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php b/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php
index 4899d3d4..3e19a7be 100644
--- a/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php
+++ b/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php
@@ -60,13 +60,17 @@ class HttpClientFactory implements ClientFactory
60 $this->logger->log('debug', 'Restricted access config enabled?', ['enabled' => (int) $this->restrictedAccess]); 60 $this->logger->log('debug', 'Restricted access config enabled?', ['enabled' => (int) $this->restrictedAccess]);
61 61
62 if (0 === (int) $this->restrictedAccess) { 62 if (0 === (int) $this->restrictedAccess) {
63 return new GuzzleAdapter(new GuzzleClient()); 63 return new GuzzleAdapter(new GuzzleClient($config));
64 } 64 }
65 65
66 // we clear the cookie to avoid websites who use cookies for analytics 66 // we clear the cookie to avoid websites who use cookies for analytics
67 $this->cookieJar->clear(); 67 $this->cookieJar->clear();
68 // need to set the (shared) cookie jar 68 if (!isset($config['defaults']['cookies'])) {
69 $guzzle = new GuzzleClient(['defaults' => ['cookies' => $this->cookieJar]]); 69 // need to set the (shared) cookie jar
70 $config['defaults']['cookies'] = $this->cookieJar;
71 }
72
73 $guzzle = new GuzzleClient($config);
70 foreach ($this->subscribers as $subscriber) { 74 foreach ($this->subscribers as $subscriber) {
71 $guzzle->getEmitter()->attach($subscriber); 75 $guzzle->getEmitter()->attach($subscriber);
72 } 76 }