Skip to content

http: throw ERR_HTTP_HEADERS_SENT when sending multiple writeHead

Rodrigo Muino Tomonari requested to merge github/fork/marco-ippolito/main into main

Currently it is possible to send multiple writeHead before res.end() and the last one will overwrite the previous headers. With this PR writeHead will throw ERR_HTTP_HEADERS_SENT if sent more than once

resolves: https://github.com/nodejs/node/issues/36721

Merge request reports

Loading