Version 5.90003
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index 6155e9c..4e97a49 100644 (file)
@@ -84,7 +84,7 @@ __PACKAGE__->stats_class('Catalyst::Stats');
 
 # Remember to update this in Catalyst::Runtime as well!
 
-our $VERSION = '5.89003';
+our $VERSION = '5.90003';
 
 sub import {
     my ( $class, @arguments ) = @_;
@@ -1863,9 +1863,18 @@ sub finalize_headers {
 
         if ( !$response->has_body ) {
             # Add a default body if none is already present
-            $response->body(
-                qq{<html><body><p>This item has moved <a href="$location">here</a>.</p></body></html>}
-            );
+            $response->body(<<"EOF");
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"> 
+  <head>
+    <title>Moved</title>
+  </head>
+  <body>
+     <p>This item has moved <a href="$location">here</a>.</p>
+  </body>
+</html>
+EOF
+            $response->content_type('text/html; charset=utf-8');
         }
     }
 
@@ -1976,7 +1985,7 @@ sub handle_request {
     return $status;
 }
 
-=head2 $c->prepare( @arguments )
+=head2 $class->prepare( @arguments )
 
 Creates a Catalyst context from an engine-specific request (Apache, CGI,
 etc.).
@@ -2726,16 +2735,6 @@ sub apply_default_middlewares {
         },
     );
 
-    my $server_matches = sub {
-        my ($re) = @_;
-        return sub {
-            my ($env) = @_;
-            my $server = $env->{SERVER_SOFTWARE};
-            return unless $server;
-            return $server =~ $re ? 1 : 0;
-        };
-    };
-
     # If we're running under Lighttpd, swap PATH_INFO and SCRIPT_NAME
     # http://lists.scsys.co.uk/pipermail/catalyst/2006-June/008361.html
     $psgi_app = Plack::Middleware::LighttpdScriptNameFix->wrap($psgi_app);