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=eebe22c10b3770433d128d3d19e9c86f1ff81fa8;hp=cd818579615e578d82d6765afd9625165b1d60ca;hb=258733f15e1e1ec4b4d92eda4b4471833890aced;hpb=aa3897dbd07156dbd1b80c5d1571101140e13a11 diff --git a/lib/Catalyst/Response.pm b/lib/Catalyst/Response.pm index cd81857..eebe22c 100644 --- a/lib/Catalyst/Response.pm +++ b/lib/Catalyst/Response.pm @@ -43,6 +43,11 @@ has headers => ( required => 1, lazy => 1, ); +has _context => ( + is => 'rw', + weak_ref => 1, + clearer => '_clear_context', +); sub output { shift->body(@_) } @@ -52,7 +57,7 @@ sub write { my ( $self, $buffer ) = @_; # Finalize headers if someone manually writes output - $self->finalize_headers; + $self->_context->finalize_headers; $buffer = q[] unless defined $buffer;