#33700: APPEND_SLASH adds significant latency to all requests not ending in / 
(even
if successful)
-------------------------------------+-------------------------------------
     Reporter:  Anders Kaseorg       |                    Owner:  Anders
         Type:                       |  Kaseorg
  Cleanup/optimization               |                   Status:  closed
    Component:  HTTP handling        |                  Version:  4.0
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  CommonMiddleware     |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Ryan Siemens):

 Just wanted to flag a performance regression in the other direction now.
 Because the `should_redirect_with_slash` redirect doesn't happen during
 `process_request` anymore it means that if a `APPEND_SLASH` did need to
 happen a 404 page would have to be rendered before the redirect occurs.
 This can be problematic if your 404 view returns a `TemplateResponse`
 which normally lazily renders after all `process_request` middleware
 happen. A early redirect in the `process_request` avoided this.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/33700#comment:11>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018feebae401-2200ffd4-3489-4303-b672-f5cbbd9ee398-000000%40eu-central-1.amazonses.com.

Reply via email to