Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down