Skip to content

Commit ff843bc

Browse files
zubairhassan652jacobtylerwalls
authored andcommitted
Fixed #36734 -- Clarified the behavior of View.http_method_not_allowed.
1 parent b1a65ea commit ff843bc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

docs/ref/class-based-views/base.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ ancestor classes are documented under the section title of **Ancestors
113113
If the view was called with an HTTP method it doesn't support, this
114114
method is called instead.
115115

116-
The default implementation returns ``HttpResponseNotAllowed`` with a
117-
list of allowed methods in plain text.
116+
The default implementation returns ``HttpResponseNotAllowed`` with the
117+
list of allowed methods in the ``Allow`` header, as required by
118+
:rfc:`RFC 7231 <7231#section-6.5.5>`. The response body is empty.
118119

119120
.. method:: options(request, *args, **kwargs)
120121

0 commit comments

Comments
 (0)