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 d4cde31

Browse filesBrowse files
[HttpClient] disable debug log with curl 7.64.0
1 parent d0b7445 commit d4cde31
Copy full SHA for d4cde31

File tree

2 files changed

+8
-4
lines changed
Filter options

2 files changed

+8
-4
lines changed

‎src/Symfony/Component/HttpClient/CurlHttpClient.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/CurlHttpClient.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public function request(string $method, string $url, array $options = []): Respo
308308
}
309309
}
310310

311-
return $pushedResponse ?? new CurlResponse($this->multi, $ch, $options, $this->logger, $method, self::createRedirectResolver($options, $host));
311+
return $pushedResponse ?? new CurlResponse($this->multi, $ch, $options, $this->logger, $method, self::createRedirectResolver($options, $host), self::$curlVersion['version_number']);
312312
}
313313

314314
/**

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/Response/CurlResponse.php
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,19 @@ final class CurlResponse implements ResponseInterface
3737
/**
3838
* @internal
3939
*/
40-
public function __construct(CurlClientState $multi, $ch, array $options = null, LoggerInterface $logger = null, string $method = 'GET', callable $resolveRedirect = null)
40+
public function __construct(CurlClientState $multi, $ch, array $options = null, LoggerInterface $logger = null, string $method = 'GET', callable $resolveRedirect = null, int $curlVersion = null)
4141
{
4242
$this->multi = $multi;
4343

4444
if (\is_resource($ch)) {
4545
$this->handle = $ch;
4646
$this->debugBuffer = fopen('php://temp', 'w+');
47-
curl_setopt($ch, CURLOPT_VERBOSE, true);
48-
curl_setopt($ch, CURLOPT_STDERR, $this->debugBuffer);
47+
if (0x074000 === $curlVersion) {
48+
fwrite($this->debugBuffer, 'Due to a bug in curl 7.64.0, the debug log is disabled; use another version to work around the issue.');
49+
} else {
50+
curl_setopt($ch, CURLOPT_VERBOSE, true);
51+
curl_setopt($ch, CURLOPT_STDERR, $this->debugBuffer);
52+
}
4953
} else {
5054
$this->info['url'] = $ch;
5155
$ch = $this->handle;

0 commit comments

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