Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cf83c60

Browse filesBrowse files
bug #35168 [HttpClient] fix capturing SSL certificates with NativeHttpClient (nicolas-grekas)
This PR was merged into the 4.3 branch. Discussion ---------- [HttpClient] fix capturing SSL certificates with NativeHttpClient | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- 234589a [HttpClient] fix capturing SSL certificates with NativeHttpClient
2 parents d394214 + 234589a commit cf83c60
Copy full SHA for cf83c60

File tree

1 file changed

+4
-4
lines changed
Filter options

1 file changed

+4
-4
lines changed

‎src/Symfony/Component/HttpClient/Response/NativeResponse.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/Response/NativeResponse.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ private function open(): void
158158
restore_error_handler();
159159
}
160160

161-
stream_set_blocking($h, false);
162-
$this->context = $this->resolveRedirect = null;
163-
164-
if (isset($context['ssl']['peer_certificate_chain'])) {
161+
if (isset($context['ssl']['capture_peer_cert_chain']) && isset(($context = stream_context_get_options($this->context))['ssl']['peer_certificate_chain'])) {
165162
$this->info['peer_certificate_chain'] = $context['ssl']['peer_certificate_chain'];
166163
}
167164

165+
stream_set_blocking($h, false);
166+
$this->context = $this->resolveRedirect = null;
167+
168168
// Create dechunk and inflate buffers
169169
if (isset($this->headers['content-length'])) {
170170
$this->remaining = (int) $this->headers['content-length'][0];

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.