Fixed #25302 -- Prevented BrokenLinkEmailsMiddleware from reporting 404s when Referer = URL.

This commit is contained in:
Maxime Lorant 2015-08-23 20:54:15 +02:00 committed by Tim Graham
parent d3fdaf907d
commit 4ce433e811
5 changed files with 43 additions and 5 deletions

View file

@ -61,8 +61,15 @@ not found" errors). Django sends emails about 404 errors when:
If those conditions are met, Django will email the users listed in the
:setting:`MANAGERS` setting whenever your code raises a 404 and the request has
a referer. (It doesn't bother to email for 404s that don't have a referer --
those are usually just people typing in broken URLs or broken Web 'bots).
a referer. It doesn't bother to email for 404s that don't have a referer --
those are usually just people typing in broken URLs or broken Web bots. It also
ignores 404s when the referer is equal to the requested URL, since this
behavior is from broken Web bots too.
.. versionchanged:: 1.9
In older versions, 404s were not ignored when the referer was equal to the
requested URL.
.. note::