gleam-lang / gleam-lang/hackney

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

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Gleam
Stars
63
Forks
13
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/benoitc/hackney/blob/master/src/hackney_request.erl#L351-L398)). 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.