DISALLOWED_USER_AGENTS predates the addition of the 403 handler and wasn't updated to take advantage of it.
I believe it would make sense to raise Http403 there. Would you mind filing a ticket on https://code.djangoproject.com/? Thanks! -- Aymeric. PS: perhaps we should audit the code base for other hardcoded responses. 2015-06-23 14:25 GMT+02:00 François Schiettecatte <[email protected]> : > What about the 403 handler ? > > https://docs.djangoproject.com/en/1.8/ref/urls/#handler403 > > François > > > On Jun 23, 2015, at 8:10 AM, [email protected] wrote: > > > > Dear, folks! > > > > I wonder is there some architecture rule that doesn't allow > CommonMiddleware raise PermissionDenied exception? > > > > Right now if django-developer wants to use DISALLOWED_USER_AGENTS > setting than all disallowed clients get empty page with simple header > "Forbidden". > > And there is no way to change this behavior (except wright your own > middleware class of cause). > > > > Thanks! > > > > -- > > Mikhail Nacharov > > > > -- > > You received this message because you are subscribed to the Google > Groups "Django developers (Contributions to Django itself)" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > To post to this group, send email to [email protected]. > > Visit this group at http://groups.google.com/group/django-developers. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/f43d50ac-8d79-4a14-a71b-d468902779ec%40googlegroups.com > . > > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/BBF5D8AA-BD06-47AC-BFD6-01281A392A44%40gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- Aymeric. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CANE-7mU8POKp6n%2BUc7Chtvxw8st9z%3DbBzA_ocpOEoeY2p6gSEw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
