@@ -2786,6 +2786,10 @@ Throws `ERR_INVALID_ARG_TYPE` for invalid `settings` argument.
27862786<!-- YAML
27872787added: v8.4.0
27882788changes:
2789+ - version: REPLACEME
2790+ pr-url: https://github.com/nodejs/node/pull/61713
2791+ description: Added `http1Options` option. The `Http1IncomingMessage`
2792+ and `Http1ServerResponse` options are now deprecated.
27892793 - version:
27902794 - v23.0.0
27912795 - v22.10.0
@@ -2904,9 +2908,27 @@ changes:
29042908 * ` Http1IncomingMessage ` {http.IncomingMessage} Specifies the
29052909 ` IncomingMessage ` class to used for HTTP/1 fallback. Useful for extending
29062910 the original ` http.IncomingMessage ` . ** Default:** ` http.IncomingMessage ` .
2911+ ** Deprecated.** Use ` http1Options.IncomingMessage ` instead. See
2912+ [ DEP0202] [ ] .
29072913 * ` Http1ServerResponse ` {http.ServerResponse} Specifies the ` ServerResponse `
29082914 class to used for HTTP/1 fallback. Useful for extending the original
29092915 ` http.ServerResponse ` . ** Default:** ` http.ServerResponse ` .
2916+ ** Deprecated.** Use ` http1Options.ServerResponse ` instead. See
2917+ [ DEP0202] [ ] .
2918+ * ` http1Options ` {Object} An options object for configuring the HTTP/1
2919+ fallback when ` allowHTTP1 ` is ` true ` . These options are passed to the
2920+ underlying HTTP/1 server. See [ ` http.createServer() ` ] [ ] for available
2921+ options. Among others, the following are supported:
2922+ * ` IncomingMessage ` {http.IncomingMessage} Specifies the
2923+ ` IncomingMessage ` class to use for HTTP/1 fallback.
2924+ ** Default:** ` http.IncomingMessage ` .
2925+ * ` ServerResponse ` {http.ServerResponse} Specifies the ` ServerResponse `
2926+ class to use for HTTP/1 fallback.
2927+ ** Default:** ` http.ServerResponse ` .
2928+ * ` keepAliveTimeout ` {number} The number of milliseconds of inactivity
2929+ a server needs to wait for additional incoming data, after it has
2930+ finished writing the last response, before a socket will be destroyed.
2931+ ** Default:** ` 5000 ` .
29102932 * ` Http2ServerRequest ` {http2.Http2ServerRequest} Specifies the
29112933 ` Http2ServerRequest ` class to use.
29122934 Useful for extending the original ` Http2ServerRequest ` .
@@ -2980,6 +3002,9 @@ server.listen(8000);
29803002<!-- YAML
29813003added: v8.4.0
29823004changes:
3005+ - version: REPLACEME
3006+ pr-url: https://github.com/nodejs/node/pull/61713
3007+ description: Added `http1Options` option.
29833008 - version:
29843009 - v15.10.0
29853010 - v14.16.0
@@ -3098,6 +3123,20 @@ changes:
30983123 and trailing whitespace validation for HTTP/2 header field names and values
30993124 as per [ RFC-9113] ( https://www.rfc-editor.org/rfc/rfc9113.html#section-8.2.1 ) .
31003125 ** Default:** ` true ` .
3126+ * ` http1Options ` {Object} An options object for configuring the HTTP/1
3127+ fallback when ` allowHTTP1 ` is ` true ` . These options are passed to the
3128+ underlying HTTP/1 server. See [ ` http.createServer() ` ] [ ] for available
3129+ options. Among others, the following are supported:
3130+ * ` IncomingMessage ` {http.IncomingMessage} Specifies the
3131+ ` IncomingMessage ` class to use for HTTP/1 fallback.
3132+ ** Default:** ` http.IncomingMessage ` .
3133+ * ` ServerResponse ` {http.ServerResponse} Specifies the ` ServerResponse `
3134+ class to use for HTTP/1 fallback.
3135+ ** Default:** ` http.ServerResponse ` .
3136+ * ` keepAliveTimeout ` {number} The number of milliseconds of inactivity
3137+ a server needs to wait for additional incoming data, after it has
3138+ finished writing the last response, before a socket will be destroyed.
3139+ ** Default:** ` 5000 ` .
31013140* ` onRequestHandler ` {Function} See [ Compatibility API] [ ]
31023141* Returns: {Http2SecureServer}
31033142
@@ -4927,6 +4966,7 @@ you need to implement any fall-back behavior yourself.
49274966[ ALPN Protocol ID ] : https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
49284967[ ALPN negotiation ] : #alpn-negotiation
49294968[ Compatibility API ] : #compatibility-api
4969+ [ DEP0202 ] : deprecations.md#dep0202-http1incomingmessage-and-http1serverresponse-options-of-http2-servers
49304970[ HTTP/1 ] : http.md
49314971[ HTTP/2 ] : https://tools.ietf.org/html/rfc7540
49324972[ HTTP/2 Headers Object ] : #headers-object
@@ -4953,6 +4993,7 @@ you need to implement any fall-back behavior yourself.
49534993[ `Http2Stream` ] : #class-http2stream
49544994[ `ServerHttp2Stream` ] : #class-serverhttp2stream
49554995[ `TypeError` ] : errors.md#class-typeerror
4996+ [ `http.createServer()` ] : http.md#httpcreateserveroptions-requestlistener
49564997[ `http2.SecureServer` ] : #class-http2secureserver
49574998[ `http2.Server` ] : #class-http2server
49584999[ `http2.createSecureServer()` ] : #http2createsecureserveroptions-onrequesthandler
0 commit comments