@@ -159,6 +159,8 @@ public function request(string $method, string $url, array $options = []): Respo
159
159
$ this ->multi ->dnsCache = $ options ['resolve ' ] + $ this ->multi ->dnsCache ;
160
160
}
161
161
162
+ $ this ->logger && $ this ->logger ->info (sprintf ('Request: %s %s ' , $ method , implode ('' , $ url )));
163
+
162
164
[$ host , $ port , $ url ['authority ' ]] = self ::dnsResolve ($ url , $ this ->multi , $ info , $ onProgress );
163
165
164
166
if (!isset ($ options ['headers ' ]['host ' ])) {
@@ -208,10 +210,7 @@ public function request(string $method, string $url, array $options = []): Respo
208
210
$ context = stream_context_create ($ context , ['notification ' => $ notification ]);
209
211
self ::configureHeadersAndProxy ($ context , $ host , $ options ['request_headers ' ], $ proxy , $ noProxy );
210
212
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 );
215
214
}
216
215
217
216
/**
0 commit comments