X-Git-Url: https://git.decadent.org.uk/gitweb/?p=maypole.git;a=blobdiff_plain;f=lib%2FMaypole.pm;h=3215b842320c6a7b8be7c002a1471c6cf6e4a153;hp=1665ca702573c60c9fbd9ae4a892956e72e64061;hb=f9a6b47b3b916585d710eac141003fb8261d9c3c;hpb=1fb6cf1887bddb2a3a003d6e148a0c016ea780b0 diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 1665ca7..3215b84 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -5,6 +5,7 @@ use strict; use warnings; use Maypole::Config; use Maypole::Constants; +use Maypole::Headers; our $VERSION = '2.05'; @@ -12,7 +13,7 @@ __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 - extra_headers ) + headers_in headers_out ) ); __PACKAGE__->config( Maypole::Config->new() ); __PACKAGE__->init_done(0); @@ -62,6 +63,7 @@ sub handler { my ( $class, $req ) = @_; $class->init unless $class->init_done; my $r = bless { template_args => {}, config => $class->config }, $class; + $r->headers_out(Maypole::Headers->new); $r->get_request($req); $r->parse_location(); my $status = $r->handler_guts(); @@ -277,9 +279,13 @@ A list of remaining parts of the request path after table and action have been removed -=head3 extra_headers +=head3 headers_in -A hash containing extra headers to be set on a request. +A L object containing HTTP headers for the request + +=head3 headers_out + +A L object that contains HTTP headers for the output =head3 parse_args