diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-01-18 04:02:03 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-01-18 04:02:03 -0800 |
commit | 5df57e4ada4d9e5c9162173ea47512a57a2e2cd7 (patch) | |
tree | 2d6ba38a76720c4267c2123dc2c80b0dc2f7eead | |
parent | 824fcf6624f003f77e5daafcb2d87f1f41f7e36f (diff) | |
parent | 31ce320c5242697b79204485f33f276fc0558a76 (diff) | |
download | nextcloud-server-5df57e4ada4d9e5c9162173ea47512a57a2e2cd7.tar.gz nextcloud-server-5df57e4ada4d9e5c9162173ea47512a57a2e2cd7.zip |
Merge pull request #1181 from owncloud/return-503-in-maintenance
in case of maintenance the error page returns http status 503.
-rw-r--r-- | lib/base.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index 6896c91822e..1146ce74eb7 100644 --- a/lib/base.php +++ b/lib/base.php @@ -231,6 +231,12 @@ class OC public static function checkMaintenanceMode() { // Allow ajax update script to execute without being stopped if (OC_Config::getValue('maintenance', false) && OC::$SUBURI != '/core/ajax/update.php') { + // send http status 503 + header('HTTP/1.1 503 Service Temporarily Unavailable'); + header('Status: 503 Service Temporarily Unavailable'); + header('Retry-After: 120'); + + // render error page $tmpl = new OC_Template('', 'error', 'guest'); $tmpl->assign('errors', array(1 => array('error' => 'ownCloud is in maintenance mode'))); $tmpl->printPage(); |