#34519: Don't send content in responses to HEAD requests
-------------------------------+--------------------------------------
Reporter: James Pic | Owner: nobody
Type: Bug | Status: closed
Component: Uncategorized | Version: 4.2
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Description changed by James Pic:
Old description:
> > 9.3.2. HEAD
> > The HEAD method is identical to GET except that the server MUST NOT
> send content in the response.
> https://www.rfc-editor.org/rfc/rfc9110.html#name-head
New description:
Responses to HEAD requests must not send content as per RFC9110
> 9.3.2. HEAD
> The HEAD method is identical to GET except that the server MUST NOT send
content in the response.
https://www.rfc-editor.org/rfc/rfc9110.html#name-head
Currently, Django sends content in response to HEAD requests.
Django *MUST NOT* send content in response for HEAD requests.
Demonstration:
{{{
$ django-admin startproject test
$ cd test && ./manage.py runserver
# tcpdump -vv -s0 -A -i lo port 8000 &> tcpdump.txt
$ curl -I localhost:8000
}}}
tcpdump.txt attached, it shows Django sends content in the HEAD response
--
--
Ticket URL: <https://code.djangoproject.com/ticket/34519#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070187be51d1bf-e4f32cef-a511-47c4-b189-532adc372334-000000%40eu-central-1.amazonses.com.