1 package ExternalCatty::Controller::Root;
5 use base qw/ Catalyst::Controller /;
7 __PACKAGE__->config( namespace => '' );
9 sub default : Private {
10 my ( $self, $c ) = @_;
11 $c->response->content_type('text/html; charset=utf-8');
12 $c->response->output( html( 'Root', 'Hello, test ☺!' ) );
14 # Newer Catalyst auto encodes UTF8, but this test case is borked and expects
15 # broken utf8 behavior. We'll make a real UTF8 Test case separately.
16 $c->clear_encoding if $c->can('clear_encoding'); # Compat with upcoming Catalyst 5.90080
19 # redirect to a redirect
21 my ( $self, $context ) = @_;
22 my $where = $context->uri_for('/');
23 $context->response->redirect($where);
28 my ( $title, $body ) = @_;
32 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
43 my $host = $c->req->header('Host') || "<undef>";
44 my $html = html( $c->config->{name}, "Host: $host" );
45 $c->response->content_type("text/html");
46 $c->response->output($html);