X-Git-Url: https://git.decadent.org.uk/gitweb/?p=maypole.git;a=blobdiff_plain;f=lib%2FCGI%2FMaypole.pm;h=88abc3cebf7218ed1f8c419937834ca04c96d5bd;hp=863bc10c66b3f1e201fa63f827fa2b7a3645e9ca;hb=271fd90b8a1b9f843853601a75a1334407ff87c4;hpb=e72c221ab5ef5973233bbfb2fa710c993f2be87d diff --git a/lib/CGI/Maypole.pm b/lib/CGI/Maypole.pm index 863bc10..88abc3c 100644 --- a/lib/CGI/Maypole.pm +++ b/lib/CGI/Maypole.pm @@ -40,10 +40,15 @@ sub parse_args { sub send_output { my $r = shift; + my %processed = map { "-".$_,$r->{extra_headers}{$_} } + keys %{$r->{extra_headers}}; print $r->{cgi}->header( -type => $r->{content_type}, -charset => $r->{document_encoding}, -content_length => do { use bytes; length $r->{output} }, + %processed + ? %processed + : {} ); print $r->{output}; }