- Check if has_a actually points to a Maypole::Model (Dave Howorth)
- Only show buttons for public actions.
(Dagfinn Ilmari Mannsåker)
+ - Added support for extra_headers
2.04 Tue Oct 27 14:00:00 2004
$r->{ar}->headers_out->set(
"Content-Length" => do { use bytes; length $r->{output} }
);
+ foreach my $header (keys %{$r->{extra_headers}}) {
+ $r->{ar}->headers_out->set(
+ "$header" => $r->{extra_headers}{$header}
+ );
+ }
APACHE2 || $r->{ar}->send_http_header;
$r->{ar}->print( $r->{output} );
}
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};
}
__PACKAGE__->mk_classdata($_) for qw( config init_done view_object );
__PACKAGE__->mk_accessors(
qw( ar params query objects model_class template_args output path
- args action template error document_encoding content_type table)
+ args action template error document_encoding content_type table
+ extra_headers )
);
__PACKAGE__->config( Maypole::Config->new() );
__PACKAGE__->init_done(0);
have been
removed
+=head3 extra_headers
+
+A hash containing extra headers to be set on a request.
+
=head3 parse_args
Turns post data and query string paramaters into a hash of C<params>.