﻿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
37512	Gunicorn now complains about HEAD responses with bodies	Kyle Dickerson		"This is a boundary issues between Django and Gunicorn resulting from changes in Gunicorn 26.1.0.

Way back in version 1.9, Django dropped its behavior of removing bodies in responses to HEAD requests on the basis that most WSGI servers already did that work.  See https://code.djangoproject.com/ticket/26052

Gunicorn 26.1.0 introduced warning logging when the application includes a body in responses to HEAD requests.  See https://github.com/benoitc/gunicorn/commit/9bc5891b4b06f25a8ce0e707053dcb2fb9bf638c

As a result, logs now get polluted with these warnings.  Gunicorn doesn't offer a simple way to control that warning (would need to craft a custom logging configuration to target the warning for exclusion).

As an application owner, Gunicorn is signalling that applications returning bodies to HEAD requests are a ""problem to be solved by the application.""  But Django explicitly removed this behavior because it was redundant with the common WSGI server implementations.

I don't know if either side is more correct than the other, but a conversation between the Django and Gunicorn teams is probably the most effective way to find a user-friendly resolution.  Otherwise each project can point the finger back at the other and the user experience will suffer indefinitely."	Uncategorized	new	HTTP handling	6.1	Low		HEAD WSGI		Unreviewed	0	0	0	0	0	0
