summaryrefslogtreecommitdiff
path: root/django/middleware/common.py
diff options
context:
space:
mode:
authorJason Pellerin <jpellerin@gmail.com>2006-11-29 20:02:43 +0000
committerJason Pellerin <jpellerin@gmail.com>2006-11-29 20:02:43 +0000
commit71012a4be3830b1040815243ebb7c0d48dbd8e57 (patch)
treee66d2227298cc0bccc4ef874d023a4ef29c60c52 /django/middleware/common.py
parentf6d48b5d02acc7cd8d71ffe895fbf41c7c9ae2b7 (diff)
[multi-db] Merge trunk to [3812]. Some tests still failing.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@4139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/middleware/common.py')
-rw-r--r--django/middleware/common.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/middleware/common.py b/django/middleware/common.py
index d63b71fed7..4f060b8590 100644
--- a/django/middleware/common.py
+++ b/django/middleware/common.py
@@ -64,8 +64,9 @@ class CommonMiddleware(object):
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.