Permalink
Browse files

Fixed #2602 -- Include User Agent in broken link emails. Thanks, Ian …

…Holsman.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 8971760 commit 3efd4dcd2d03c235a1b28d382466440a33c271f9 @malcolmt malcolmt committed Sep 22, 2006
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/middleware/common.py
View
3 django/middleware/common.py
@@ -64,8 +64,9 @@ def process_response(self, request, response):
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\nUser Agent: %s\n" % (referer, request.get_full_path(), ua))
return response
# Use ETags, if requested.

0 comments on commit 3efd4dc

Please sign in to comment.