X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FResponse.pm;h=4d0e85a032c15260dbf5f2f177ffd02f94545dc5;hb=65905d68f5081a6eaf392e6ef3a84b63e2a04701;hp=fa3b1462c00eb45502fc027fc2f600123acfec4e;hpb=8a3dcb987d47c13e0665cb975658df8c88442d7e;p=catagits%2FCatalyst-Runtime.git 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(@_) }