Closed
Bug 639367
Opened 15 years ago
Closed 15 years ago
Set the HTTP status to 503 when Bugzilla is down for maintenance to avoid pages from being indexed
Categories
(Bugzilla :: Bugzilla-General, enhancement)
Bugzilla
Bugzilla-General
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: bjoern, Assigned: bjoern)
Details
Attachments
(2 files, 1 obsolete file)
|
475 bytes,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
|
566 bytes,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0b12) Gecko/20110222 Firefox/4.0b12
Build Identifier: trunc
to prevent search engines index bugzilla content while the maintenance mode message is displayed, please apply this patch.
Reproducible: Always
Comment 2•15 years ago
|
||
That seems pretty reasonable to me. LpSolit, what do you think?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → Bugzilla 4.2
Updated•15 years ago
|
Assignee: general → bjoern
Comment 3•15 years ago
|
||
I don't know. Does a Bugzilla installation remain in this mode long enough to cause trouble?
I noticed that sites that had been crawled during maintainence window were indexed with the maintenance message. I would call that not "trouble" but quite undesirable.
Comment 5•15 years ago
|
||
Hmm. Does noindex prevent the crawler from coming back again, though?
yes, search enginges do come back. it may take longer though until they drop in next time. The crawler behaviour is simply undefined. So noindext meta tag might in fact not be the optimal solution. In addiion to that the original site will also no longer be indexed anyway. HTTP code 503 would actually be the best even though of course this is not very pretty looking. Returning HTTP code 503 for crawler-like HTTP_USER_AGENT strings only would be another option. Do what you think is best and what is worth it ... :-)
hmm... - the 503 solution must not be unpretty at all. The http body data (out html output) can actually stay unmodified. All we need to do is write the
Status: 503 Service Temporarily Unavailable
in the http header. That will show crawlers that the site is down AND the crawler will come back timely. See https://bugzilla.samba.org/test-error-503.cgi for a 503 error page in our well-known look. You can do a curl --head to see that this is really a 503 page.
Comment 8•15 years ago
|
||
Ah, I like that idea! If all browsers render the body with a 503, we should be good. The place to patch would be Bugzilla.pm's init_page.
Attachment #517296 -
Attachment is obsolete: true
Comment 10•15 years ago
|
||
Comment on attachment 517920 [details] [diff] [review]
patch for http status 503 in mainenance mode
Looks good and works properly! We should add a comment over it explaining why it's a 503, on checkin.
BTW, for future patches, to make sure they get reviewed, make sure to request review as per our development process described here:
http://wiki.mozilla.org/Bugzilla:Developers
Attachment #517920 -
Flags: review+
Updated•15 years ago
|
Flags: approval+
Comment 11•15 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla.pm
Committed revision 7748.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Summary: pages should not be indexed when in maintenance mode → Set the HTTP status to 503 when Bugzilla is down for maintenance to avoid pages from being indexed
| Assignee | ||
Comment 12•15 years ago
|
||
it is actually better to always add a retry-after header along with a 503 response because it is being seen like a 500 response otherwise. This patch adds a retry-after of one day which looks like a good value to me.
Attachment #520924 -
Flags: review?(mkanat)
Comment 13•15 years ago
|
||
Comment on attachment 520924 [details] [diff] [review]
patch to add a retry-after header
Oh, since this has already been checked in, could you file a separate bug with a new patch against the current trunk?
Attachment #520924 -
Flags: review?(mkanat)
| Assignee | ||
Comment 14•15 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•