#2602: [patch] add User Agent to broken link emails -----------------------------+---------------------------------------------- Reporter: [EMAIL PROTECTED] | Owner: adrian Type: enhancement | Status: new Priority: normal | Milestone: Component: Core framework | Version: Severity: normal | Keywords: session handling -----------------------------+---------------------------------------------- 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. }}}
-- Ticket URL: <http://code.djangoproject.com/ticket/2602> Django <http://code.djangoproject.org/> The web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates -~----------~----~----~----~------~----~------~--~---