diff --git a/miniserv.pl b/miniserv.pl index 92a3e0945..df7b35c66 100755 --- a/miniserv.pl +++ b/miniserv.pl @@ -2808,7 +2808,7 @@ else { &reset_byte_count(); &write_data("\n"); &write_data("
$body
\n"); } @@ -6473,14 +6473,17 @@ return $ENV{ uc($key) } || $ENV{ lc($key) }; # Returns a style for error messages sub get_error_style { -my ($type) = @_; -my $style = ' style="font-family:Lucida Console,Courier,monospace;white-space:pre-wrap;'; +my ($type, $extra_style) = @_; +my $style = ' style="font-family:Lucida Console,Courier,monospace;'; if ($type eq 'heading') { - $style .= 'color:#f12b2b;font-size:14px;padding:5px 2.5px 0;transform:scale(1,1.5);text-transform:uppercase;'; + $style .= 'color:#f12b2b;font-size:14px;padding:5px 2.5px 0;transform:scale(1,1.5);text-transform:uppercase;white-space:pre-wrap;font-weight:500;'; } if ($type eq 'content') { - $style .= 'font-size:12.5px;padding-left:2.5px;transform:scale(1,1.2);'; + $style .= 'font-size:12.5px;padding-left:2.5px;white-space:pre-wrap;'; } -$style .= '"'; +if ($type eq 'body') { + $style .= 'font-size:12.5px;'; + } +$style .= "$extra_style\""; return $style; } diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 12d1b573e..7c7d24a9f 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -1621,20 +1621,31 @@ else { @_,"\n"; } else { - print "$text{'error'}: ",($main::whatfailed ? "$main::whatfailed : " : ""), - @_,"| $text{'error_file'} | ", "$text{'error_line'} | ", "$text{'error_sub'} |