Fix redirect logging
This commit is contained in:
parent
40b11442c2
commit
b8314f0c30
|
@ -170,12 +170,14 @@ class HTTPRequest implements IHTTPRequest
|
||||||
$curlOptions[CURLOPT_BINARYTRANSFER] = 1;
|
$curlOptions[CURLOPT_BINARYTRANSFER] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$logger = $this->logger;
|
||||||
|
|
||||||
$onRedirect = function(
|
$onRedirect = function(
|
||||||
RequestInterface $request,
|
RequestInterface $request,
|
||||||
ResponseInterface $response,
|
ResponseInterface $response,
|
||||||
UriInterface $uri
|
UriInterface $uri
|
||||||
) {
|
) use ($logger) {
|
||||||
$this->logger->notice('Curl redirect.', ['url' => $request->getUri(), 'to' => $uri]);
|
$logger->notice('Curl redirect.', ['url' => $request->getUri(), 'to' => $uri]);
|
||||||
};
|
};
|
||||||
|
|
||||||
$onHeaders = function (ResponseInterface $response) use ($opts) {
|
$onHeaders = function (ResponseInterface $response) use ($opts) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user