Skip to content

Commit

Permalink
http: res.setHeader 18.x backport
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ippolito committed Feb 21, 2023
1 parent bcef834 commit e835966
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/_http_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,9 @@ function writeHead(statusCode, reason, obj) {
if (k) this.setHeader(k, obj[k]);
}
}
if (k === undefined && this._header) {
throw new ERR_HTTP_HEADERS_SENT('render');
}
// Only progressive api is used
headers = this[kOutHeaders];
} else {
Expand Down

0 comments on commit e835966

Please sign in to comment.