mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #26567 -- Updated references to obsolete RFC2616.
Didn't touch comments where it wasn't obvious that the code adhered to the newer standard.
This commit is contained in:
committed by
Tim Graham
parent
fb68674ea4
commit
ac77c55bc5
@@ -1127,9 +1127,8 @@ directly. This function sets, or adds to, the ``Vary header``. For example::
|
||||
its first argument and a list/tuple of case-insensitive header names as its
|
||||
second argument.
|
||||
|
||||
For more on Vary headers, see the `official Vary spec`_.
|
||||
|
||||
.. _`official Vary spec`: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.44
|
||||
For more on Vary headers, see the :rfc:`official Vary spec
|
||||
<7231#section-7.1.4>`.
|
||||
|
||||
Controlling cache: Using other headers
|
||||
======================================
|
||||
@@ -1211,7 +1210,8 @@ Here's a full list:
|
||||
* ``max_age=num_seconds``
|
||||
* ``s_maxage=num_seconds``
|
||||
|
||||
For explanation of Cache-Control HTTP directives, see the `Cache-Control spec`_.
|
||||
For explanation of Cache-Control HTTP directives, see the :rfc:`Cache-Control
|
||||
spec <7234#section-5.2>`.
|
||||
|
||||
(Note that the caching middleware already sets the cache header's max-age with
|
||||
the value of the :setting:`CACHE_MIDDLEWARE_SECONDS` setting. If you use a custom
|
||||
@@ -1229,8 +1229,6 @@ Example::
|
||||
def myview(request):
|
||||
# ...
|
||||
|
||||
.. _`Cache-Control spec`: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
|
||||
|
||||
Order of ``MIDDLEWARE_CLASSES``
|
||||
===============================
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ Depending on the header, if the page has been modified or does not match the
|
||||
``ETag`` sent by the client, a 412 status code (Precondition Failed) may be
|
||||
returned.
|
||||
|
||||
.. _If-match: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.24
|
||||
.. _If-none-match: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26
|
||||
.. _If-modified-since: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25
|
||||
.. _If-unmodified-since: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.28
|
||||
.. _If-match: https://tools.ietf.org/html/rfc7232#section-3.1
|
||||
.. _If-none-match: https://tools.ietf.org/html/rfc7232#section-3.2
|
||||
.. _If-modified-since: https://tools.ietf.org/html/rfc7232#section-3.3
|
||||
.. _If-unmodified-since: https://tools.ietf.org/html/rfc7232#section-3.4
|
||||
|
||||
When you need more fine-grained control you may use per-view conditional
|
||||
processing functions.
|
||||
@@ -45,7 +45,7 @@ functions to provide an "early bailout" option for the view processing.
|
||||
Telling the client that the content has not been modified since the last
|
||||
request, perhaps.
|
||||
|
||||
.. _ETag: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11
|
||||
.. _ETag: https://tools.ietf.org/html/rfc7232#section-2.3
|
||||
|
||||
These two functions are passed as parameters the
|
||||
``django.views.decorators.http.condition`` decorator. This decorator uses
|
||||
|
||||
@@ -321,8 +321,8 @@ Use the ``django.test.Client`` class to make requests.
|
||||
``Response`` object. Useful for simulating diagnostic probes.
|
||||
|
||||
Unlike the other request methods, ``data`` is not provided as a keyword
|
||||
parameter in order to comply with :rfc:`2616`, which mandates that
|
||||
TRACE requests should not have an entity-body.
|
||||
parameter in order to comply with :rfc:`7231#section-4.3.8`, which
|
||||
mandates that TRACE requests must not have a body.
|
||||
|
||||
The ``follow``, ``secure``, and ``extra`` arguments act the same as for
|
||||
:meth:`Client.get`.
|
||||
@@ -484,8 +484,10 @@ Specifically, a ``Response`` object has the following attributes:
|
||||
|
||||
.. attribute:: status_code
|
||||
|
||||
The HTTP status of the response, as an integer. See
|
||||
:rfc:`2616#section-10` for a full list of HTTP status codes.
|
||||
The HTTP status of the response, as an integer. For a full list
|
||||
of defined codes, see the `IANA status code registry`_.
|
||||
|
||||
.. _IANA status code registry: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
|
||||
|
||||
.. attribute:: templates
|
||||
|
||||
|
||||
Reference in New Issue
Block a user