diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-21 12:17:38 +0100 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-21 12:17:38 +0100 |
commit | bd45bb3ad30c8867b957f63d5423e90b4b41afe9 (patch) | |
tree | 0e23fd25c822f8b463daf4f70bdac6739c2822c3 | |
parent | 6942c715d0342dd83ec035b576aa23f7213cf4e9 (diff) | |
parent | fabf7081d39481bb22ee27c4beaf96e5529168eb (diff) | |
download | volse-hubzilla-bd45bb3ad30c8867b957f63d5423e90b4b41afe9.tar.gz volse-hubzilla-bd45bb3ad30c8867b957f63d5423e90b4b41afe9.tar.bz2 volse-hubzilla-bd45bb3ad30c8867b957f63d5423e90b4b41afe9.zip |
Merge remote-tracking branch 'upstream/master'
-rw-r--r-- | include/network.php | 25 | ||||
-rw-r--r-- | include/system_unavailable.php | 4 | ||||
-rw-r--r-- | version.inc | 2 |
3 files changed, 25 insertions, 6 deletions
diff --git a/include/network.php b/include/network.php index 65599bd05..026f5ee0a 100644 --- a/include/network.php +++ b/include/network.php @@ -320,17 +320,18 @@ function xml_status($st, $message = '') { killme(); } + + /** - * @brief Send HTTP status header and exit. + * @brief Send HTTP status header * * @param int $val * integer HTTP status result value * @param string $msg * optional message - * @returns (does not return, process is terminated) + * @returns nil */ -function http_status_exit($val, $msg = '') { - +function http_status($val, $msg = '') { if ($val >= 400) $msg = (($msg) ? $msg : 'Error'); if ($val >= 200 && $val < 300) @@ -338,10 +339,26 @@ function http_status_exit($val, $msg = '') { logger('http_status_exit ' . $val . ' ' . $msg); header($_SERVER['SERVER_PROTOCOL'] . ' ' . $val . ' ' . $msg); +} + + + +/** + * @brief Send HTTP status header and exit. + * + * @param int $val + * integer HTTP status result value + * @param string $msg + * optional message + * @returns (does not return, process is terminated) + */ +function http_status_exit($val, $msg = '') { + http_status($val, $msg); killme(); } + // convert an XML document to a normalised, case-corrected array // used by webfinger diff --git a/include/system_unavailable.php b/include/system_unavailable.php index 00a73fc38..4e0e6717b 100644 --- a/include/system_unavailable.php +++ b/include/system_unavailable.php @@ -1,7 +1,9 @@ <?php /** @file */ +require_once("include/network.php"); + function system_down() { -header('HTTP/1.0 503 Service Unavailable'); +http_status(503, 'Service Unavailable'); echo <<< EOT <html> <head><title>System Unavailable</title></head> diff --git a/version.inc b/version.inc index 05ca8c657..625be791e 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-11-20.1222 +2015-11-20.1223 |