Applied patch from debian RT #106385
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Response / Writer.pm
index 55cbdd1..0037461 100644 (file)
@@ -5,7 +5,7 @@ sub close { shift->{_writer}->close }
 
 sub write_encoded {
   my ($self, $line) = @_;
-  if((my $enc = $self->{_encoding}) && $self->{_requires_encoding}) {
+  if((my $enc = $self->{_context}->encoding) && $self->{_requires_encoding}) {
     # Not going to worry about CHECK arg since Unicode always croaks I think - jnap
     $line = $enc->encode($line);
   }
@@ -13,7 +13,7 @@ sub write_encoded {
   $self->write($line);
 }
 
-=head1 TITLE 
+=head1 NAME
 
 Catalyst::Response::Writer - Proxy over the PSGI Writer