diff --git a/doc/api/http2.md b/doc/api/http2.md index 5d45b0fef70..42249105506 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -3750,6 +3750,12 @@ For incoming headers: * For duplicate `cookie` headers, the values are joined together with '; '. * For all other headers, the values are joined together with ', '. +The `node:http` module uses different rules for [`message.headers`][]. +For example, `node:http` joins duplicate `date`, `if-match`, and `range` +headers, but `node:http2` discards them. For duplicate `server` headers, the +behavior is the opposite. If your code serves HTTP/1 and HTTP/2 and must get +all values of a header, use the [HTTP/2 Raw Headers][]. + ```mjs import { createServer } from 'node:http2'; const server = createServer(); @@ -5474,6 +5480,7 @@ you need to implement any fall-back behavior yourself. [`http2.createServer()`]: #http2createserveroptions-onrequesthandler [`http2stream.pushStream()`]: #http2streampushstreamheaders-options-callback [`import()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import +[`message.headers`]: http.md#messageheaders [`net.Server.close()`]: net.md#serverclosecallback [`net.Socket.bufferSize`]: net.md#socketbuffersize [`net.Socket.prototype.ref()`]: net.md#socketref