@@ -159,6 +159,8 @@ public function request(string $method, string $url, array $options = []): Respo
159159 $ this ->multi ->dnsCache = $ options ['resolve ' ] + $ this ->multi ->dnsCache ;
160160 }
161161
162+ $ this ->logger && $ this ->logger ->info (sprintf ('Request: %s %s ' , $ method , implode ('' , $ url )));
163+
162164 [$ host , $ port , $ url ['authority ' ]] = self ::dnsResolve ($ url , $ this ->multi , $ info , $ onProgress );
163165
164166 if (!isset ($ options ['headers ' ]['host ' ])) {
@@ -208,10 +210,7 @@ public function request(string $method, string $url, array $options = []): Respo
208210 $ context = stream_context_create ($ context , ['notification ' => $ notification ]);
209211 self ::configureHeadersAndProxy ($ context , $ host , $ options ['request_headers ' ], $ proxy , $ noProxy );
210212
211- $ url = implode ('' , $ url );
212- $ this ->logger && $ this ->logger ->info (sprintf ('Request: %s %s ' , $ method , $ url ));
213-
214- return new NativeResponse ($ this ->multi , $ context , $ url , $ options , $ gzipEnabled , $ info , $ resolveRedirect , $ onProgress , $ this ->logger );
213+ return new NativeResponse ($ this ->multi , $ context , implode ('' , $ url ), $ options , $ gzipEnabled , $ info , $ resolveRedirect , $ onProgress , $ this ->logger );
215214 }
216215
217216 /**
0 commit comments