django/tests/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
cond_get_urls.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
extra_urls.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_security.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
tests.py Fixed #33700 -- Skipped extra resolution for successful requests not ending with /. 2022-06-02 15:15:04 +02:00
urls.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
views.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00