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 1893ef9

Browse filesBrowse files
bug #36038 [HttpClient] disable debug log with curl 7.64.0 (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- [HttpClient] disable debug log with curl 7.64.0 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #35975 | License | MIT | Doc PR | - Works around https://curl.haxx.se/mail/archive-2019-02/0013.html Commits ------- d4cde31 [HttpClient] disable debug log with curl 7.64.0
2 parents f9b2714 + d4cde31 commit 1893ef9
Copy full SHA for 1893ef9

2 files changed

+8-4Lines changed: 8 additions & 4 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎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
/**
Collapse file

‎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.