Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#2602 closed enhancement (fixed)

[patch] add User Agent to broken link emails

Reported by: ian@… 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


i'm getting slammed by a bad bot..
this will give me some more information on what is causing the link error.

---   (revision 3656)
+++   (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.

Change History (1)

comment:1 Changed 13 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [3778]) Fixed #2602 -- Include User Agent in broken link emails. Thanks, Ian Holsman.

Note: See TracTickets for help on using tickets.
Back to Top