Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3e2f2e3

Browse files
committed
bug #52442 Disable the "Copy as cURL" button when the debug info are disabled (stof)
This PR was merged into the 6.3 branch. Discussion ---------- Disable the "Copy as cURL" button when the debug info are disabled | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #52441 | License | MIT Some versions of curl have a bug that prevents collecting the debug info. This is reported by writing an explanation message in the debug buffer. When this is detecting, the "Copy as cURL" button is now skipped (like for other unsupported cases) instead of copying a broken command. Commits ------- f66dd14 Disable the "Copy as cURL" button when the debug info are disabled
2 parents 5bff8c5 + f66dd14 commit 3e2f2e3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Component/HttpClient/DataCollector/HttpClientDataCollector.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ private function getCurlCommand(array $trace): ?string
230230
break;
231231
}
232232

233+
if (str_starts_with('Due to a bug in curl ', $line)) {
234+
// When the curl client disables debug info due to a curl bug, we cannot build the command.
235+
return null;
236+
}
237+
233238
if ('' === $line || preg_match('/^[*<]|(Host: )/', $line)) {
234239
continue;
235240
}

0 commit comments

Comments
 (0)