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=4d0e85a032c15260dbf5f2f177ffd02f94545dc5;hp=fa3b1462c00eb45502fc027fc2f600123acfec4e;hb=9ae060f08b6948a1d89eef14fff9d78e6a435d29;hpb=8a3dcb987d47c13e0665cb975658df8c88442d7e diff --git a/lib/Catalyst/Response.pm b/lib/Catalyst/Response.pm index fa3b146..4d0e85a 100644 --- a/lib/Catalyst/Response.pm +++ b/lib/Catalyst/Response.pm @@ -82,6 +82,15 @@ has _context => ( clearer => '_clear_context', ); +before [qw(status headers content_encoding content_length content_type header)] => sub { + my $self = shift; + + $self->_context->log->warn( + "Useless setting a header value after finalize_headers called." . + " Not what you want." ) + if ( $self->finalized_headers && @_ ); +}; + sub output { shift->body(@_) } sub code { shift->status(@_) }