diff --git a/AUTHORS b/AUTHORS index 74399f840f..d12b5fb346 100644 --- a/AUTHORS +++ b/AUTHORS @@ -120,6 +120,7 @@ answer newbie questions, and generally made Django that much better: Sengtha Chay ivan.chelubeev@gmail.com Bryan Chow + Tom Christie Antonis Christofides Michal Chruszcz Can Burak Çilingir diff --git a/docs/topics/http/file-uploads.txt b/docs/topics/http/file-uploads.txt index 63454f05a4..e5298ef2cb 100644 --- a/docs/topics/http/file-uploads.txt +++ b/docs/topics/http/file-uploads.txt @@ -238,6 +238,8 @@ could, for example, use custom handlers to enforce user-level quotas, compress data on the fly, render progress bars, and even send data to another storage location directly without storing it locally. +.. _modifying_upload_handlers_on_the_fly: + Modifying upload handlers on the fly ------------------------------------ diff --git a/docs/topics/http/middleware.txt b/docs/topics/http/middleware.txt index c9c2311b19..be2a774c95 100644 --- a/docs/topics/http/middleware.txt +++ b/docs/topics/http/middleware.txt @@ -97,6 +97,21 @@ calling ANY other request, view or exception middleware, or the appropriate view; it'll return that :class:`~django.http.HttpResponse`. Response middleware is always called on every response. +.. note:: + Accessing :attr:`request.POST ` or + :attr:`request.REQUEST ` inside + middleware from ``process_request`` or ``process_view`` will prevent any + view running after the middleware from being able to + :ref:`modify the upload handlers for the + request `, and should normally be + avoided. + + The :class:`~django.middleware.csrf.CsrfViewMiddleware` class can be + considered an exception, as it provides the + :func:`~django.views.decorators.csrf.csrf_exempt` and + :func:`~django.views.decorators.csrf.csrf_protect` decorators which allow + views to explicitly control at what point the CSRF validation should occur. + .. _template-response-middleware: ``process_template_response``