[HttpClient] fix capturing SSL certificates with NativeHttpClient
This commit is contained in:
parent
f3d8fd2521
commit
234589a753
@ -158,13 +158,13 @@ final class NativeResponse implements ResponseInterface
|
|||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
stream_set_blocking($h, false);
|
if (isset($context['ssl']['capture_peer_cert_chain']) && isset(($context = stream_context_get_options($this->context))['ssl']['peer_certificate_chain'])) {
|
||||||
$this->context = $this->resolveRedirect = null;
|
|
||||||
|
|
||||||
if (isset($context['ssl']['peer_certificate_chain'])) {
|
|
||||||
$this->info['peer_certificate_chain'] = $context['ssl']['peer_certificate_chain'];
|
$this->info['peer_certificate_chain'] = $context['ssl']['peer_certificate_chain'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stream_set_blocking($h, false);
|
||||||
|
$this->context = $this->resolveRedirect = null;
|
||||||
|
|
||||||
// Create dechunk and inflate buffers
|
// Create dechunk and inflate buffers
|
||||||
if (isset($this->headers['content-length'])) {
|
if (isset($this->headers['content-length'])) {
|
||||||
$this->remaining = (int) $this->headers['content-length'][0];
|
$this->remaining = (int) $this->headers['content-length'][0];
|
||||||
|
Reference in New Issue
Block a user