X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FResponse.pm;h=eebe22c10b3770433d128d3d19e9c86f1ff81fa8;hb=6329bfe593d5ea3891011333f7d7984b4e5e7910;hp=185dc99727b309c32e00876156f9dc5a511edd1b;hpb=9c4288eaedee0bba8e4a123b4664bc07a4b5c24c;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Response.pm b/lib/Catalyst/Response.pm index 185dc99..eebe22c 100644 --- a/lib/Catalyst/Response.pm +++ b/lib/Catalyst/Response.pm @@ -53,17 +53,11 @@ sub output { shift->body(@_) } sub code { shift->status(@_) } -=head2 $self->write($buffer) - -Writes the buffer to the client. - -=cut - sub write { my ( $self, $buffer ) = @_; # Finalize headers if someone manually writes output - $self->finalize_headers; + $self->_context->finalize_headers; $buffer = q[] unless defined $buffer; @@ -73,12 +67,6 @@ sub write { return $len; } -=head2 $self->finalize_headers($c) - -Abstract method, allows engines to write headers to response - -=cut - sub finalize_headers { my ($self) = @_; @@ -263,6 +251,10 @@ Writes $data to the output stream. Prints @data to the output stream, separated by $,. This lets you pass the response object to functions that want to write to an L. +=head2 $self->finalize_headers($c) + +Writes headers to response if not already written + =head2 DEMOLISH Ensures that the response is flushed and closed at the end of the