[geeklog-cvs] geeklog: Send a Content-Type with the site_disabled message

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Jan 17 04:38:46 EST 2010


changeset 7599:a14252ca181c
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/a14252ca181c
user: Dirk Haun <dirk at haun-online.de>
date: Sat Jan 16 19:51:24 2010 +0100
description:
Send a Content-Type with the site_disabled message

diffstat:

 public_html/lib-common.php |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 7ff48f0151aa -r a14252ca181c public_html/lib-common.php
--- a/public_html/lib-common.php	Sun Jan 10 20:29:40 2010 +0100
+++ b/public_html/lib-common.php	Sat Jan 16 19:51:24 2010 +0100
@@ -111,7 +111,8 @@
     if (empty($_CONF['site_disabled_msg'])) {
         header("HTTP/1.1 503 Service Unavailable");
         header("Status: 503 Service Unavailable");
-        echo $_CONF['site_name'] . ' is temporarily down.  Please check back soon.';
+        header('Content-Type: text/plain; charset=' . COM_getCharset());
+        echo $_CONF['site_name'] . ' is temporarily down.  Please check back soon.' . LB;
     } else {
         // if the msg starts with http: assume it's a URL we should redirect to
         if (preg_match("/^(https?):/", $_CONF['site_disabled_msg']) === 1) {
@@ -119,7 +120,8 @@
         } else {
             header("HTTP/1.1 503 Service Unavailable");
             header("Status: 503 Service Unavailable");
-            echo $_CONF['site_disabled_msg'];
+            header('Content-Type: text/html; charset=' . COM_getCharset());
+            echo $_CONF['site_disabled_msg'] . LB;
         }
     }
 



More information about the geeklog-cvs mailing list