bug #31069 Make sure that logged URL is the same as the one which is requested. (drupol)
This PR was squashed before being merged into the 4.3-dev branch (closes #31069).
Discussion
----------
Make sure that logged URL is the same as the one which is requested.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31068
| License | MIT
Commits
-------
526cad6909
Make sure that logged URL is the same as the one which is requested.
This commit is contained in:
commit
66701b84f5
@ -159,6 +159,8 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
|
|||||||
$this->multi->dnsCache = $options['resolve'] + $this->multi->dnsCache;
|
$this->multi->dnsCache = $options['resolve'] + $this->multi->dnsCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->logger && $this->logger->info(sprintf('Request: %s %s', $method, implode('', $url)));
|
||||||
|
|
||||||
[$host, $port, $url['authority']] = self::dnsResolve($url, $this->multi, $info, $onProgress);
|
[$host, $port, $url['authority']] = self::dnsResolve($url, $this->multi, $info, $onProgress);
|
||||||
|
|
||||||
if (!isset($options['headers']['host'])) {
|
if (!isset($options['headers']['host'])) {
|
||||||
@ -208,10 +210,7 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
|
|||||||
$context = stream_context_create($context, ['notification' => $notification]);
|
$context = stream_context_create($context, ['notification' => $notification]);
|
||||||
self::configureHeadersAndProxy($context, $host, $options['request_headers'], $proxy, $noProxy);
|
self::configureHeadersAndProxy($context, $host, $options['request_headers'], $proxy, $noProxy);
|
||||||
|
|
||||||
$url = implode('', $url);
|
return new NativeResponse($this->multi, $context, implode('', $url), $options, $gzipEnabled, $info, $resolveRedirect, $onProgress, $this->logger);
|
||||||
$this->logger && $this->logger->info(sprintf('Request: %s %s', $method, $url));
|
|
||||||
|
|
||||||
return new NativeResponse($this->multi, $context, $url, $options, $gzipEnabled, $info, $resolveRedirect, $onProgress, $this->logger);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user