1
0
mirror of https://github.com/django/django.git synced 2025-01-13 20:07:13 +00:00
django/tests/middleware
Anders Kaseorg fbac2a4dd8 Fixed -- 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 ().
Meanwhile, the logging issue  that it targeted was subsequently
fixed more fully by commit 40b69607c7
(), 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 Merged regressiontests and modeltests into the test root. 2013-02-26 14:36:57 +01:00
cond_get_urls.py Refs -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
extra_urls.py Refs -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_security.py Refs -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
tests.py Fixed -- Skipped extra resolution for successful requests not ending with /. 2022-06-02 15:15:04 +02:00
urls.py Refs -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
views.py Refs -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00