Skip to content

Commit 8d249f4

Browse files
[HttpClient] Resolve hostnames in NoPrivateNetworkHttpClient
1 parent 2b2b170 commit 8d249f4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

HttpClientInterface.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ interface HttpClientInterface
4848
'buffer' => true, // bool|resource|\Closure - whether the content of the response should be buffered or not,
4949
// or a stream resource where the response body should be written,
5050
// or a closure telling if/where the response should be buffered based on its headers
51-
'on_progress' => null, // callable(int $dlNow, int $dlSize, array $info) - throwing any exceptions MUST abort
52-
// the request; it MUST be called on DNS resolution, on arrival of headers and on
53-
// completion; it SHOULD be called on upload/download of data and at least 1/s
51+
'on_progress' => null, // callable(int $dlNow, int $dlSize, array $info, ?Closure $resolve = null) - throwing any
52+
// exceptions MUST abort the request; it MUST be called on connection, on headers and on
53+
// completion; it SHOULD be called on upload/download of data and at least 1/s;
54+
// if passed, $resolve($host) / $resolve($host, $ip) can be called to read / populate
55+
// the DNS cache respectively
5456
'resolve' => [], // string[] - a map of host to IP address that SHOULD replace DNS resolution
5557
'proxy' => null, // string - by default, the proxy-related env vars handled by curl SHOULD be honored
5658
'no_proxy' => null, // string - a comma separated list of hosts that do not require a proxy to be reached

0 commit comments

Comments
 (0)