﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15637	Add a require_safe decorator for views to accept GET or HEAD	Aymeric Augustin	nobody	"It is a good practice to reject POST requests on views that are not intended to process them. Django provides the require_GET decorator for this purpose.

Although browsers only implement GET and POST methods, other software such as link checkers uses HEAD requests. Views protected by require_GET will (obviously) reject such requests with ""405 Method Not Allowed"". I've encountered the problem with the ""Check My Links"" extension for Google Chrome.

However, RFC2616 says that ""The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response."" Django already enforces this behavior by stripping the body of the responses to HEAD requests. So I think that in most cases, it makes more sense to accept GET and HEAD than only GET.

That is why I'm proposing a ""require_safe"" decorator for this purpose."	New feature	closed	HTTP handling	dev	Normal	fixed		Tom Christie leidel@…	Ready for checkin	1	0	0	0	0	0
