#2602 closed enhancement (fixed)
[patch] add User Agent to broken link emails
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Core (Other) | Version: | |
Severity: | normal | Keywords: | session handling |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
i'm getting slammed by a bad bot..
this will give me some more information on what is causing the link error.
Index: common.py =================================================================== --- common.py (revision 3656) +++ common.py (working copy) @@ -64,8 +64,9 @@ is_internal = referer and (domain in referer) path = request.get_full_path() if referer and not _is_ignorable_404(path) and (is_internal or '?' not in referer): + ua = request.META.get('HTTP_USER_AGENT','-none-') mail_managers("Broken %slink on %s" % ((is_internal and 'INTERNAL ' or ''), domain), - "Referrer: %s\nRequested URL: %s\n" % (referer, request.get_full_path())) + "Referrer: %s\nRequested URL: %s\nUA: %s\n" % (referer, request.get_full_path(),ua)) return response # Use ETags, if requested.
Note:
See TracTickets
for help on using tickets.
(In [3778]) Fixed #2602 -- Include User Agent in broken link emails. Thanks, Ian Holsman.