]> git.nbdom.net Git - nb.git/commitdiff
header
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 27 Nov 2023 11:11:09 +0000 (12:11 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 27 Nov 2023 11:11:09 +0000 (12:11 +0100)
lib/perl/NB/CGI.pm

index 18007524b033c944c4f6860734cb1128f1831452..6547bc287bc5d09a7fed9c1de551243ca6aaf504 100644 (file)
@@ -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);
 }