Unverified Commit 277271c4 authored by Yann Hamon's avatar Yann Hamon Committed by Beth Griggs
Browse files

http: send connection: close when closing conn

HTTP/1.1 mandates connections which do not support keep-alive and
close the connection send the connection: close header, see
https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.10

This page also provides more information:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Connection

I understand that HTTP/1.1 defaults to keep-alive - and that the
Connection: close header is required when closing a connection.

This adds the Connection: close header in the 400 responses
sent on client errors.

Backport-PR-URL: https://github.com/nodejs/node/pull/26627
PR-URL: https://github.com/nodejs/node/pull/26467


Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
parent 55d3be7e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment