Skip to content

Unnecessary Content-Type and Content-Length headers are included with GET requests #5

@pvsr

Description

@pvsr

Currently all GET requests from gleam_hackney include Content-Type and Content-Length headers, even when the body is empty (in which case they're application/octet-stream and 0 respectively, defaults from hackney). RFC 9110 says " A user agent SHOULD NOT send a Content-Length header field when the request message does not contain content and the method semantics do not anticipate such data." Most sites probably handle it fine but I ran into one page that responds to any GET having a non-empty Content-Length with a 500.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions