File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 66
77class Curl implements RequestResolverInterface
88{
9+ protected static $ tmpCookies ;
910 protected $ isBinary ;
1011 protected $ result ;
1112 protected $ content ;
@@ -109,16 +110,18 @@ protected function resolve()
109110 $ this ->content = '' ;
110111 $ this ->isBinary = null ;
111112
112- $ tmpCookies = str_replace ('// ' , '/ ' , sys_get_temp_dir ().'/embed-cookies.txt ' );
113+ if (!self ::$ tmpCookies ) {
114+ self ::$ tmpCookies = str_replace ('// ' , '/ ' , sys_get_temp_dir ().'/embed-cookies.txt ' );
115+ }
113116
114117 $ connection = curl_init ();
115118
116119 curl_setopt_array ($ connection , [
117120 CURLOPT_RETURNTRANSFER => false ,
118121 CURLOPT_FOLLOWLOCATION => true ,
119122 CURLOPT_URL => $ this ->url ,
120- CURLOPT_COOKIEJAR => $ tmpCookies ,
121- CURLOPT_COOKIEFILE => $ tmpCookies ,
123+ CURLOPT_COOKIEJAR => self :: $ tmpCookies ,
124+ CURLOPT_COOKIEFILE => self :: $ tmpCookies ,
122125 CURLOPT_HEADERFUNCTION => [$ this , 'headerCallback ' ],
123126 CURLOPT_WRITEFUNCTION => [$ this , 'writeCallback ' ],
124127 ] + $ this ->config );
You can’t perform that action at this time.
0 commit comments