浏览代码

[FrameworkBundle] Adding a title tag to make the default error page just a little bit longer so that chrome displays it

The background is that Chrome only displays the content returned on an error page if payload is at least 512 bytes.
Prior to this change, the 404 page was just a few bytes short, resulting in the Chrome error message instead of the
real one returned by Symfony (confusing for the user).
Ryan Weaver 14 年之前
父节点
当前提交
1910e23df8
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception/error.html.twig

+ 1 - 0
src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception/error.html.twig

@@ -2,6 +2,7 @@
 <html>
 <html>
     <head>
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <title>An Error Occurred: {{ status_text }}</title>
     </head>
     </head>
     <body>
     <body>
         <h1>Oops! An Error Occurred</h1>
         <h1>Oops! An Error Occurred</h1>