Skip to content
Discussion options

You must be logged in to vote

It's not valid HTTP: https://www.rfc-editor.org/rfc/rfc9110.html#section-8.6

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

Gun does not currently have an option for this. Gun is stricter here with HTTP/2+ as the check isn't performed with HTTP/1.1. Perhaps you can use HTTP/1.1 for this specific request for now.

I guess that even if a content-length isn't allowed by HTTP, a content-length of zero is fairly harmless so introducing an option to relax those harmless checks could be a long term solution.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@erlend-axelsson
Comment options

Answer selected by erlend-axelsson
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants