Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
a011cac4
Commit
a011cac4
authored
Mar 22, 2011
by
Bjoern Jacke
Committed by
Max Kanat-Alexander
Mar 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 643925: When shutdownhtml sends an HTTP 503, also include a Retry-After
header. r=mkanat, a=mkanat
parent
764a1fa6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
Bugzilla.pm
Bugzilla.pm
+10
-3
No files found.
Bugzilla.pm
View file @
a011cac4
...
...
@@ -76,6 +76,10 @@ use constant SHUTDOWNHTML_EXIT_SILENTLY => qw(
whine.pl
)
;
# shutdownhtml pages are sent as an HTTP 503. After how many seconds
# should search engines attempt to index the page again?
use
constant
SHUTDOWNHTML_RETRY_AFTER
=>
3600
;
#####################################################################
# Global Code
#####################################################################
...
...
@@ -170,9 +174,12 @@ sub init_page {
else
{
$extension
=
'txt'
;
}
# Set the HTTP status to 503 when Bugzilla is down to avoid pages
# from being indexed.
print
Bugzilla
->
cgi
->
header
(
-
status
=>
503
)
if
i_am_cgi
();
if
(
i_am_cgi
())
{
# Set the HTTP status to 503 when Bugzilla is down to avoid pages
# being indexed by search engines.
print
Bugzilla
->
cgi
->
header
(
-
status
=>
503
,
-
retry_after
=>
SHUTDOWNHTML_RETRY_AFTER
);
}
my
$t_output
;
$template
->
process
(
"global/message.$extension.tmpl"
,
$vars
,
\
$t_output
)
||
ThrowTemplateError
(
$template
->
error
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment