Skip to content

net/http: make "http: ContentLength=N with Body length 0" error message more intelligible #43650

@leventov

Description

@leventov

I think it would be nice to make error message more intelligible, e. g. "Request.Body's length (0) doesn't match Content-Length header (N)"

It may seem very obvious when you already know what the present error message means, but actually I couldn't understand. This SO question has 11k views and I suspect the majority of them are other confused developers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions