$c->finalize_error;
}
- if ( !$c->response->body_length && $c->response->status !~ /^(1|3)\d\d$/ ) {
+ if ( !$c->response->body && $c->response->status !~ /^(1|3)\d\d$/ ) {
$c->finalize_error;
}
- if ( $c->response->body_length && !$c->response->content_length ) {
- $c->response->content_length( $c->response->body_length );
+ if ( $c->response->body && !$c->response->content_length ) {
+ use bytes; # play safe with a utf8 aware perl
+ $c->response->content_length( length $c->response->body );
}
my $status = $c->finalize_headers;
request => Catalyst::Request->new(
{
arguments => [],
- body => undef,
cookies => {},
headers => HTTP::Headers->new,
parameters => {},
+ secure => 0,
snippets => [],
uploads => {}
}
),
response => Catalyst::Response->new(
- {
- body => undef,
- cookies => {},
- headers => HTTP::Headers->new,
- status => 200
+ {
+ body => undef,
+ cookies => {},
+ headers => HTTP::Headers->new,
+ status => 200
}
),
stash => {},