summaryrefslogtreecommitdiff
path: root/tests/servers/urls.py
AgeCommit message (Collapse)Author
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2018-12-31Updated test URL patterns to use path() and re_path().Tim Graham
2018-12-19Fixed #30015 -- Ensured request body is properly consumed for keep-alive ↵Konstantin Alekseev
connections.
2018-11-10Fixed keep-alive support in manage.py runserver.Florian Apolloner
Ticket #25619 changed the default protocol to HTTP/1.1 but did not properly implement keep-alive. As a "fix" keep-alive was disabled in ticket #28440 to prevent clients from hanging (they expect the server to send more data if the connection is not closed and there is no content length set). The combination of those two fixes resulted in yet another problem: HTTP/1.1 by default allows a client to assume that keep-alive is supported unless the server disables it via 'Connection: close' -- see RFC2616 8.1.2.1 for details on persistent connection negotiation. Now if the client receives a response from Django without 'Connection: close' and immediately sends a new request (on the same tcp connection) before our server closes the tcp connection, it will error out at some point because the connection does get closed a few milli seconds later. This patch fixes the mentioned issues by always sending 'Connection: close' if we cannot determine a content length. The code is inefficient in the sense that it does not allow for persistent connections when chunked responses are used, but that should not really cause any problems (Django does not generate those) and it only affects the development server anyways. Refs #25619, #28440.
2017-02-09Fixed #20238 -- Added threading support to LiveServerTestCase.Nadège Michel
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-04-03Fixed #22218 -- Deprecated django.conf.urls.patterns.Tim Graham
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner