Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not auto-remove content headers for body-less status codes #5320

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 17, 2023

  1. Do not remove content headers for 304

    According to [RFC 2616 (HTTP/1.1 spec)](https://datatracker.ietf.org/doc/html/rfc2616#page-54) a `HEAD` request is supposed to return *exactly* the same entity-headers as a `GET` request would but without body.
    [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.2) further specifies that:
    "Transfer-Encoding MAY be sent in a response to a HEAD request or in a 304 (Not Modified) response"
    and
    "A server MAY send a Content-Length header field in a 304 (Not Modified) response to a conditional GET request"
    LJ1102 authored and Jan Scheurer committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    7a02161 View commit details
    Browse the repository at this point in the history