mirror of
https://github.com/django/django.git
synced 2024-12-26 11:06:07 +00:00
Fixed sending mail on 404s to fail silently.
A failure in the e-mail system should not turn a 404 into a 500. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
30fbe92ebf
commit
c0dd2babb1
@ -104,7 +104,8 @@ class CommonMiddleware(object):
|
|||||||
ip = request.META.get('REMOTE_ADDR', '<none>')
|
ip = request.META.get('REMOTE_ADDR', '<none>')
|
||||||
mail_managers("Broken %slink on %s" % ((is_internal and 'INTERNAL ' or ''), domain),
|
mail_managers("Broken %slink on %s" % ((is_internal and 'INTERNAL ' or ''), domain),
|
||||||
"Referrer: %s\nRequested URL: %s\nUser agent: %s\nIP address: %s\n" \
|
"Referrer: %s\nRequested URL: %s\nUser agent: %s\nIP address: %s\n" \
|
||||||
% (referer, request.get_full_path(), ua, ip))
|
% (referer, request.get_full_path(), ua, ip),
|
||||||
|
fail_silently=True)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
# Use ETags, if requested.
|
# Use ETags, if requested.
|
||||||
|
Loading…
Reference in New Issue
Block a user