diff --git a/doc/api/http2.md b/doc/api/http2.md index ac97dd6dbfad..b78f139efa1f 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -1128,6 +1128,15 @@ For HTTP/2 Client `Http2Session` instances only, the `http2session.request()` creates and returns an `Http2Stream` instance that can be used to send an HTTP/2 request to the connected server. +When sending a request, header values must not contain characters outside the +`latin1` encoding, and the `:path` pseudo-header must not contain unescaped +characters (this `:path` check is always enforced). + +This strict validation can be relaxed via the `httpValidation` option of +[`http2.connect()`](#http2connectauthority-options-listener). The `'relaxed'` +mode allows control characters permitted by the Fetch specification, and the +`'insecure'` mode skips header value validation. + When a `ClientHttp2Session` is first created, the socket may not yet be connected. If `clienthttp2session.request()` is called during this time, the actual request will be deferred until the socket is ready to go. @@ -3303,6 +3312,9 @@ server.listen(8443);