Skip to content

net/http: Response.Write includes Content-Length header on 204s #16942

@bradfitz

Description

@bradfitz

Apparently we send a Content-Length header on a 204 response:

https://play.golang.org/p/bxy_rEBy-s

A 204 can't have a body anyway, so the Content-Length is useless and misleading. (It might be a protocol violation? Haven't checked.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions