django1/django/middleware
Anders Kaseorg fbac2a4dd8 Fixed #33700 -- Skipped extra resolution for successful requests not ending with /.
By moving a should_redirect_with_slash call out of an if block, commit
9390da7fb6 negated the performance fix
of commit 434d309ef6 (#24720).
Meanwhile, the logging issue #26293 that it targeted was subsequently
fixed more fully by commit 40b69607c7
(#26504), so it is no longer needed.  This effectively reverts it.

This speeds up successful requests not ending with / when APPEND_SLASH
is enabled (the default, and still useful in projects with a mix of
URLs with and without trailing /).  The amount of speedup varies from
about 5% in a typical project to nearly 50% on a benchmark with many
routes.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-06-02 15:15:04 +02:00
..
__init__.py Imported Django from private SVN repository (created from r. 8825) 2005-07-13 01:25:57 +00:00
cache.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
clickjacking.py Refs #30426 -- Updated XFrameOptionsMiddleware docstring. 2022-04-29 21:17:27 +02:00
common.py Fixed #33700 -- Skipped extra resolution for successful requests not ending with /. 2022-06-02 15:15:04 +02:00
csrf.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
gzip.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
http.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
locale.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
security.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00