From 16bb7ba0a5364c494218b61617fbca01d32be8d4 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Mon, 27 Nov 2023 12:11:09 +0100 Subject: [PATCH] header --- lib/perl/NB/CGI.pm | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/perl/NB/CGI.pm b/lib/perl/NB/CGI.pm index 18007524..6547bc28 100644 --- a/lib/perl/NB/CGI.pm +++ b/lib/perl/NB/CGI.pm @@ -199,18 +199,14 @@ sub header { } } - # NB 26.11.23 for (my $i=0;$i<@_-1;$i++) - # NB 26.11.23 { - # NB 26.11.23 next if $_[$i] ne '-type'; - # NB 26.11.23 #$status = $_[$i+1]; - # NB 26.11.23 #splice(@_,$i,2); - # NB 26.11.23 } - my @head = (); push @head,&CGI::header(@p); - #unshift @head,($ENV{SERVER_PROTOCOL}||'HTTP/1.1')." $status" - unshift @head,header_stats($status) - if $status and @head and !&CGI::nph; + if ($status and @head and !&CGI::nph) + { + $status = $self->header_status($status); + $status =~ s/\s+$//; + unshift @head,$status; + } return join($CGI::CRLF,@head); } -- 2.47.3