summaryrefslogtreecommitdiff
path: root/tests/servers/test_basehttp.py
AgeCommit message (Collapse)Author
2025-10-20Fixed #36470 -- Prevented log injection in runserver when handling NOT FOUND.YashRaj1506
Migrated `WSGIRequestHandler.log_message()` to use a more robust `log_message()` helper, which was based of `log_response()` via factoring out the common bits. Refs CVE-2025-48432. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2023-12-31Fixed #35051 -- Prevented runserver from removing non-zero Content-Length ↵Paul Bailey
for HEAD requests.
2023-01-27Fixed #28054 -- Made runserver not return response body for HEAD requests.Sarah Boyce
Co-authored-by: jannschu <jannik.schuerg@posteo.de>
2022-02-14Refs #25684 -- Removed double newline from request/response output of runserver.rafrafek
Follow up to 0bc5cd628042bf0a44df60a93085a4f991a84dfb.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2020-12-14Fixed #32240 -- Made runserver suppress ↵Petter Strandmark
ConnectionAbortedError/ConnectionResetError errors. See https://bugs.python.org/issue27682 and https://github.com/python/cpython/pull/9713
2020-12-14Refs #4444 -- Added tests for handling broken pipe errors in WSGIServer.Petter Strandmark
2018-11-27Made reused RequestFactory instances class attributes.Simon Charette
2018-05-07Captured logging in tests with self.assertLogs().Claude Paroz
2018-05-07Replaced django.test.utils.patch_logger() with assertLogs().Claude Paroz
Thanks Tim Graham for the review.
2017-05-27Fixed #28249 -- Removed unnecessary dict.keys() calls.Jon Dufresne
iter(dict) is equivalent to iter(dict.keys()).
2017-02-09Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().Tim Graham
2017-01-20Refs #23919 -- Removed unneeded str() callsClaude Paroz
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2016-08-08Refs #27025 -- Fixed a servers test on Python 3.6.Tim Graham
After https://hg.python.org/cpython/rev/4ea79767ff75/, test_strips_underscore_headers fails with: 'Stub' object has no attribute 'sendall'.
2016-02-08Refs #25684 -- Silenced logging output in servers tests.Tim Graham
2016-01-11Fixed #25684 -- Made runserver use logging for request/response output.Flavio Curella
Thanks andreif for the contributing to the patch.
2015-08-01Fixed #25204 -- Added missing space in runserver logging.Tim Graham
2015-07-20Replaced six.BytesIO with io.BytesIOTim Graham
2015-05-20Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette
2015-02-19Fixed typo in error message in the test.Tim Graham
2015-01-13Stripped headers containing underscores to prevent spoofing in WSGI environ.Carl Meyer
This is a security fix. Disclosure following shortly. Thanks to Jedediah Smith for the report.
2014-11-29Fixed #23930 -- Added copies of captured_std* managers from CPython's ↵wrwrwr
test.support. StringIO import was adapted for compatibility with Python 2.
2014-09-09Fixed #23398 -- Added helpful error message when runserver is accessed via HTTPSFlavio Curella