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
So I feel a better semantic would would a 204 (No Content) response, which would remove the need for a content-length header altogether.
View all comments
Show parent comment
5
u/HugoNikanor Oct 11 '26
RFC 9110 (HTTP) specifies that:
So I feel a better semantic would would a 204 (No Content) response, which would remove the need for a content-length header altogether.