From 749f3e158b31de895ff2eb02c8286534514baaac Mon Sep 17 00:00:00 2001 From: Philipp Date: Wed, 25 Aug 2021 20:39:33 +0200 Subject: [PATCH] Use temporary files for the URLResolver CookieJar --- src/Factory/HTTPClientFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Factory/HTTPClientFactory.php b/src/Factory/HTTPClientFactory.php index 7f7d5e5d7..bd6bb6427 100644 --- a/src/Factory/HTTPClientFactory.php +++ b/src/Factory/HTTPClientFactory.php @@ -103,7 +103,7 @@ class HTTPClientFactory extends BaseFactory $resolver->setMaxResponseDataSize(1000000); // Designate a temporary file that will store cookies during the session. // Some websites test the browser for cookie support, so this enhances results. - $resolver->setCookieJar(get_temppath() . '/url_resolver.cookie', true); + $resolver->setCookieJar(tempnam(get_temppath(), 'resolver-cookie-')); return new HTTPClient($logger, $this->profiler, $guzzle, $resolver); }