]> git.mxchange.org Git - friendica.git/commitdiff
Use temporary files for the URLResolver CookieJar
authorPhilipp <admin@philipp.info>
Wed, 25 Aug 2021 18:39:33 +0000 (20:39 +0200)
committerPhilipp <admin@philipp.info>
Wed, 25 Aug 2021 18:39:33 +0000 (20:39 +0200)
src/Factory/HTTPClientFactory.php

index 7f7d5e5d7381e7ddaeee914048d815a00fa1717a..bd6bb6427b834c291e35e8220735ea5f2674d2a9 100644 (file)
@@ -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);
        }