X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FResponse.pm;h=2c63ac733cd223aa5d7f32ba8004380e1c75702a;hp=cb280dd2b50290d3ece519ba54d65dc3b0d60ad7;hb=6680c772eaa987eafdb32e9437fd2d649dc914d9;hpb=66e67eb66f6271135230e9444ea9b4ecc57062f5 diff --git a/lib/Catalyst/Response.pm b/lib/Catalyst/Response.pm index cb280dd..2c63ac7 100644 --- a/lib/Catalyst/Response.pm +++ b/lib/Catalyst/Response.pm @@ -1,16 +1,20 @@ package Catalyst::Response; use Moose; +use HTTP::Headers; -has cookies => (is => 'rw'); -has body => (is => 'rw'); +has cookies => (is => 'rw', default => sub { {} }); +has body => (is => 'rw', default => ''); has location => (is => 'rw'); -has status => (is => 'rw'); +has status => (is => 'rw', default => 200); +has finalized_headers => (is => 'rw', default => 0); has headers => ( is => 'rw', handles => [qw(content_encoding content_length content_type header)], + default => sub { HTTP::Headers->new() }, + required => 1, + lazy => 1, ); - has _context => ( is => 'rw', weak_ref => 1,