Skip to content

HTTP 204 No Content with Transfer-Encoding header violates RFC 7230 #165

@alexanderlukanin13

Description

@alexanderlukanin13

Currently, waitress 204 response looks like this:

HTTP/1.1 204 No Content
Allow: GET, DELETE, HEAD, OPTIONS
Connection: close
Date: Tue, 06 Jun 2017 07:43:55 GMT
Server: waitress
Transfer-Encoding: chunked
Vary: Accept
X-Frame-Options: SAMEORIGIN

Transfer-Encoding violates RFC 7230:

https://tools.ietf.org/html/rfc7230#section-3.3.1

A server MUST NOT send a Transfer-Encoding header field in any response with a status code of 1xx (Informational) or 204 (No Content).

https://tools.ietf.org/html/rfc7230#section-3.3.2

A server MUST NOT send a Content-Length header field in any response with a status code of 1xx (Informational) or 204 (No Content).

In practice, such behavior breaks some clients, such as requests (if server is behind Google Cloud Load Balancer).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions