@@ -192,7 +192,7 @@ added: v8.4.0
192192-->
193193
194194The ` 'remoteSettings' ` event is emitted when a new SETTINGS frame is received
195- from the connected peer. When invoked, the handle function will receive a copy
195+ from the connected peer. When invoked, the handler function will receive a copy
196196of the remote settings.
197197
198198``` js
@@ -1725,7 +1725,7 @@ those to lower-case (e.g. `content-type`) upon transmission.
17251725
17261726Header field-names * must only* contain one or more of the following ASCII
17271727characters: ` a ` -` z ` , ` A ` -` Z ` , ` 0 ` -` 9 ` , ` ! ` , ` # ` , ` $ ` , ` % ` , ` & ` , ` ' ` , ` * ` , ` + ` ,
1728- ` - ` , ` . ` , ` ^ ` , ` _ ` , `` (backtick), ` | ` , and ` ~ ` .
1728+ ` - ` , ` . ` , ` ^ ` , ` _ ` , `` ` `` (backtick), ` | ` , and ` ~ ` .
17291729
17301730Using invalid characters within an HTTP header field name will cause the
17311731stream to be closed with a protocol error being reported.
@@ -1883,12 +1883,12 @@ const server = createSecureServer(
18831883
18841884function onRequest (req , res ) {
18851885 // detects if it is a HTTPS request or HTTP/2
1886- const { socket: { alpnProtocol } } = request .httpVersion === ' 2.0' ?
1887- request .stream .session : request ;
1888- response .writeHead (200 , { ' content-type' : ' application/json' });
1889- response .end (JSON .stringify ({
1886+ const { socket: { alpnProtocol } } = req .httpVersion === ' 2.0' ?
1887+ req .stream .session : req ;
1888+ res .writeHead (200 , { ' content-type' : ' application/json' });
1889+ res .end (JSON .stringify ({
18901890 alpnProtocol,
1891- httpVersion: request .httpVersion
1891+ httpVersion: req .httpVersion
18921892 }));
18931893}
18941894```
0 commit comments