Changeset 950506
- Timestamp:
- 07/17/2014 06:00:34 PM (12 years ago)
- Location:
- busy-server/trunk
- Files:
-
- 3 edited
-
busy-server-admin.php (modified) (1 diff)
-
busy-server.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
busy-server/trunk/busy-server-admin.php
r950493 r950506 4 4 Plugin URI: https://github.com/gibboncz/busy-server 5 5 Description: When the server load is higher than specified, show an error message instead of loading the page. 6 Version: 0.2. 16 Version: 0.2.2 7 7 Author: Lubos Svoboda 8 8 */ -
busy-server/trunk/busy-server.php
r950493 r950506 4 4 Plugin URI: http://wordpress.org/plugins/busy-server/ 5 5 Description: When the server load is higher than specified, show an error message instead of loading the page. 6 Version: 0.2. 16 Version: 0.2.2 7 7 Author: Lubos Svoboda 8 8 */ … … 73 73 if (!function_exists('busy_server_show')) { 74 74 function busy_server_show() { 75 $busy_msg = get_option('busy_server_busy_message'); 76 if (empty($busy_msg)) 77 $busy_msg = 'Server is busy. Please try reloading this page after few minutes.'; // default message 78 echo $busy_msg; 79 exit; 80 } 81 } 75 76 header("HTTP/1.1 503 Service Temporarily Unavailable"); 77 header("Status: 503 Service Temporarily Unavailable"); 78 header("Retry-After: 3600"); 79 ?><!DOCTYPE html> 80 <html> 81 <head> 82 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 83 <title>Server Busy</title> 84 <meta name="robots" content="none" /> 85 </head> 86 <body> 87 <div> 88 <?php 89 90 $busy_msg = get_option('busy_server_busy_message'); 91 if (empty($busy_msg)) 92 $busy_msg = 'Server is busy. Please try reloading this page after few minutes.'; // default message 93 echo $busy_msg; 94 echo '</div></body>'; 95 exit; 96 } 97 } 82 98 83 99 //Calculate load for UNIX multiple core machine, @return float -
busy-server/trunk/readme.txt
r950494 r950506 4 4 Requires at least: 3.4.2 5 5 Tested up to: 3.9.1 6 Stable tag: 0.2. 16 Stable tag: 0.2.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 49 49 = 0.2 = 50 50 Custom error message and maximum load settings 51 52 = 0.2.1 = 53 Fixed default values 54 55 = 0.2.2 = 56 Added proper 503 HTTP headers
Note: See TracChangeset
for help on using the changeset viewer.