From 64a25ac8044cf9c76b57e8a976b6122568f84637 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 14 Oct 2023 18:14:43 +0200 Subject: [PATCH] curlopt2href.pl: special-case the debug function CURLINFO defines Reported-by: Jeroen Ooms Fixes #309 --- libcurl/c/curlopt2href.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcurl/c/curlopt2href.pl b/libcurl/c/curlopt2href.pl index 8a8252f3ed..536d857fac 100644 --- a/libcurl/c/curlopt2href.pl +++ b/libcurl/c/curlopt2href.pl @@ -6,6 +6,10 @@ # while() { + # The debug function defines are *badly* reusing the same prefix as the + # options for curl_easy_getinfo, so special-case them in a separate regex + # first. Skip if preceded by letters making it likely to be a link + $_ =~ s/([^\">\/])(CURLINFO_(TEXT|HEADER_IN|HEADER_OUT|DATA_IN|DATA_OUT|SSL_DATA_IN|SSL_DATA_OUT|END))/$1$2<\/a>/g; # skip if preceded by letters making it likely to be a link $_ =~ s/([^\">\/])(CURL(OPT|INFO|MOPT|SHOPT)_[A-Z_0-9]+)/$1$2<\/a>/g; # also linkify libcurl function calls