From 1f4b467ea85548665b4ba31507996e377159d63d Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Sun, 28 Sep 2025 01:20:29 +0300 Subject: [PATCH] Fix to never mess around with headers; no headers check log --- web-lib-funcs.pl | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index d19292cef..8646d9420 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -7581,14 +7581,8 @@ if ($opened) { close $fh or return "Error: close($file): $!"; } -# Optionally print to UI (web scripts only) -if ($main::webmin_script_type eq 'web') { - # Print HTTP header once per process - our $var_dump__hdr_sent ||= 0; - if (!$var_dump__hdr_sent && !$main::done_webmin_header) { - print "Content-type: text/html; charset=UTF-8\n\n"; - $var_dump__hdr_sent = 1; - } +# Optionally print to UI (web scripts only) only if header already sent +if ($main::done_webmin_header && $main::webmin_script_type eq 'web') { # Limit long dumps by wrapping parameter chunks between accordion lines my $out = $dump_txt; # Add header