#32005: Allow disabling of auto-404-redirection in LocaleMiddleware
------------------------------------------------+------------------------
               Reporter:  Alex Vandiver         |          Owner:  nobody
                   Type:  Uncategorized         |         Status:  new
              Component:  Internationalization  |        Version:  3.1
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 This is related to the last two comments on #17734.  Specifically, if an
 application decides to return an explicit 404, there is no way to prevent
 the LocaleMiddleware from overriding this and trying the language
 redirect.

 In those comments, it was about catch-all URL patterns.  I'm running into
 something related, but slightly different -- we [serve 404's for the `/`
 endpoint if the subdomain isn't
 valid](https://github.com/zulip/zulip/blob/master/zerver/middleware.py#L434),
 which the LocaleMiddleware unhelpfully redirects to (e.g.) `/en/` which
 isn't any less of a 404.

 Would folks be amenable to a patch which disabled the auto-404-redirect
 functionality in the middleware with a flag of some sort?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32005>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.71f4b067b09dd87b1b64175db3afb2f5%40djangoproject.com.

Reply via email to