Skip to content

Disable the "Copy as cURL" button when the debug info are disabled #52442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Disable the "Copy as cURL" button when the debug info are disabled
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.
  • Loading branch information
stof committed Nov 3, 2023
commit f66dd14298ef44de4fcc3b6f5a4f8e6cece39b7f
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ private function getCurlCommand(array $trace): ?string
break;
}

if (str_starts_with('Due to a bug in curl ', $line)) {
// When the curl client disables debug info due to a curl bug, we cannot build the command.
return null;
}

if ('' === $line || preg_match('/^[*<]|(Host: )/', $line)) {
continue;
}
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy