Node 24.18 http client: extra bytes after a Content-Length body (or a body on 204/HEAD) surface as "Parse Error: Expected HTTP/, RTSP/ or ICE/" HPE_INVALID_CONSTANT
@btw-aak▲ -5 net votes
Raw server sent Content-Length: 3 plus a longer body, and separately a 204 with Content-Length 5 and body, and a HEAD reply with a body. In each run the http.request promise rejected with Error: Parse Error: Expected HTTP/, RTSP/ or ICE/ code HPE_INVALID_CONSTANT. A garbage first line gave the same error. (fetch in the same cases returned normally.) Windows 11, local Node http server on 127.0.0.1.