Commit Graph

292 Commits

Author SHA1 Message Date
Carlton Gibson eea0bf7bd5 Refs #30669 -- Removed incorrect branch in ASGIHander.read_body().
None is not valid for settings.FILE_UPLOAD_MAX_MEMORY_SIZE.
Always use SpooledTemporaryFile.
2019-07-31 13:33:01 +02:00
Piotr Domanski 4b4e68a7a6 Fixed #30567 -- Made WSGIHandler pass FileResponse.block_size to wsgi.file_wrapper. 2019-07-26 07:31:51 +02:00
Mariusz Felisiak 7f19e37135 Refs #30451 -- Added more tests for ASGIRequest and ASGIHandler. 2019-06-20 12:29:58 +02:00
Andrew Godwin a415ce70be Fixed #30451 -- Added ASGI handler and coroutine-safety.
This adds an ASGI handler, asgi.py file for the default project layout,
a few async utilities and adds async-safety to many parts of Django.
2019-06-20 12:29:43 +02:00
Mariusz Felisiak 415e899dc4 Refs #30451 -- Added HttpRequest._set_content_type_params() hook. 2019-06-15 10:29:02 -07:00
Tim Graham bff5ccff75 Refs #24829 -- Removed TemplateResponse rendering in BaseHandler.get_response().
Obsolete since 742ea51413.
2018-11-20 11:04:44 -05:00
Tim Graham 3529d0eabf Corrected docs and removed unused code for got_request_exception signal's sender argument.
Inaccurate since 7d1b69dbe7.
2018-11-20 10:15:58 -05:00
Tim Graham cafb34963c Removed BaseHandler.get_exception_response().
Unused since 7d1b69dbe7.
2018-11-20 09:45:29 -05:00
Sergey Fedoseev 8ef8bc0f64 Refs #28909 -- Simplifed code using unpacking generalizations. 2018-09-28 09:57:12 -04:00
Matthew Power 18098d261f Fixed #29673 -- Reset the URLconf at the end of each request.
Co-authored-by: Ross Thorne <rmwthorne@googlemail.com>
2018-09-26 15:35:24 -04:00
Jon Dufresne 82f286cf6f Refs #29784 -- Switched to https:// links where available. 2018-09-26 08:48:47 +02:00
Josh Schneier 98e8c0293b Removed unused HttpRequest._post_parse_error attribute.
Unused since 8f8c54f70b.
2018-06-07 18:51:33 -04:00
Daniel Hepper 4e016d1372 Removed obsolete BaseHandler attributes.
Unused since d334f46b7a.
2018-05-27 11:21:27 -04:00
Samir Shah 10b44e4525 Fixed #26688 -- Fixed HTTP request logging inconsistencies.
* Added logging of 500 responses for instantiated responses.
* Added logging of all 4xx and 5xx responses.
2018-05-04 20:55:03 -04:00
Tim Graham d0a42a14c0 Fixed imports per isort 4.3.1.
Partially reverted 9bcf73d788.
2018-02-02 14:44:07 -05:00
Mariusz Felisiak 9bcf73d788 Fixed imports per isort 4.3.0. 2018-02-01 09:29:46 +01:00
Дилян Палаузов d7b2aa24f7 Fixed #28982 -- Simplified code with and/or. 2018-01-03 20:12:23 -05:00
Nick Pope d13a9e44de Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking. 2017-12-11 07:08:45 -05:00
Дилян Палаузов c69e4bc691 Fixed #28769 -- Replaced 'x if x else y' with 'x or y'. 2017-11-07 09:08:46 -05:00
Sergey Fedoseev 8b2515a450 Removed unneeded __init__() methods. 2017-09-07 08:10:49 -04:00
Claude Paroz 301de774c2 Refs #27795 -- Replaced many force_text() with str()
Thanks Tim Graham for the review.
2017-04-27 09:10:02 +02:00
Claude Paroz 8346680e1c Refs #27795 -- Removed unneeded force_text calls
Thanks Tim Graham for the review.
2017-03-04 18:18:21 +01:00
Asif Saifuddin Auvi 5f3a689f71 Imported django.http classes instead of django.http. 2017-02-27 14:47:11 -05:00
Anton Samarchyan 5a6f70b428 Refs #27656 -- Updated django.core docstring verbs according to PEP 257. 2017-02-21 11:58:42 -05:00
amalia 2f10216f84 Fixed #27820 -- Fixed RequestDataTooBig/TooManyFieldsSent crash. 2017-02-13 16:19:03 -05:00
Tim Graham 500532c95d Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode(). 2017-02-09 09:03:47 -05:00
Vytis Banaitis d1bab24e01 Refs #23919, #27778 -- Removed obsolete mentions of unicode. 2017-01-26 08:19:27 -05:00
chillaranand d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Tim Graham 9e6e32bf5d Refs #23919 -- Removed django.utils.decorators.available_attrs() usage.
It's only needed to workaround a bug on Python 2.
2017-01-21 13:20:17 -05:00
Claude Paroz 042b7350a0 Refs #23919 -- Removed unneeded str() calls 2017-01-20 14:13:55 +01:00
Claude Paroz dc8834cad4 Refs #23919 -- Removed unneeded force_str calls 2017-01-20 08:44:31 +01:00
Simon Charette cecc079168 Refs #23919 -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
Claude Paroz 7b2f2e74ad Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz c716fe8782 Refs #23919 -- Removed six.PY2/PY3 usage
Thanks Tim Graham for the review.
2017-01-18 16:21:28 +01:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Tim Graham d334f46b7a Refs #26601 -- Removed support for old-style middleware using settings.MIDDLEWARE_CLASSES. 2017-01-17 20:52:04 -05:00
Tim Graham 3cee9edd1b Refs #24733 -- Removed support for error views without the exception parameter.
Per deprecation timeline.
2017-01-17 20:52:00 -05:00
Berker Peksag a02b5848ae Replaced property() usage with decorator in several places. 2016-08-25 20:06:22 -04:00
Tim Graham a3abbe1fcb Removed a blank line per isort. 2016-08-24 13:58:57 -04:00
Claude Paroz 48c34f3336 Fixed #26971 -- Prevented crash with non-UTF-8 incoming PATH_INFO
Thanks Tim Graham and Loïc Bistuer for the reviews.
2016-08-23 22:40:07 +02:00
Alex Hill 44a6b40280 Fixed #26915 -- Fixed regression handling responses returned from view middleware. 2016-07-25 13:41:50 -04:00
Tim Graham 7e303d15c3 Refs #12594 -- Removed obsolete exception handling in handle_uncaught_exception().
Since 859fc020a7, this is no longer needed.
2016-06-24 09:27:47 -04:00
Claude Paroz 742ea51413 Refs #24829 -- Made TemplateResponse.content available sooner in exception context
Thanks Tim Graham for the initial patch.
2016-06-24 10:22:30 +02:00
Carl Meyer 7d1b69dbe7 Refs #26601 -- Improved backwards-compatibility of DEP 5 middleware exception handling. 2016-06-17 10:00:39 -07:00
Tim Graham ece4d24f8e Refs #26601 -- Deprecated old-style middleware. 2016-05-17 07:22:26 -04:00
Florian Apolloner 9baf692a58 Fixed #26601 -- Improved middleware per DEP 0005.
Thanks Tim Graham for polishing the patch, updating the tests, and
writing documentation. Thanks Carl Meyer for shepherding the DEP.
2016-05-17 07:22:22 -04:00
Florian Apolloner 05c888ffb8 Refs #26601 -- Refactored BaseHandler to prepare for new-style middleware. 2016-05-17 07:20:56 -04:00
David Evans 2fcafd169b Fixed #26546 -- Allowed HTTPStatus enum values for HttpResponse.status. 2016-04-29 10:55:01 -04:00
Tim Graham bb0b4b705b Fixed #26052 -- Moved conditional_content_removal() processing to the test client. 2016-04-25 07:56:07 -04:00
Carl Worth 40b69607c7 Fixed #26504 -- Avoided logging "Not Found" warnings if a middleware handles the 404.
For example, this avoids a warning in the case of a request that's
redirected to a language-prefixed URL by LocaleMiddleware.
2016-04-20 21:02:05 -04:00