@@ -192,7 +192,7 @@ added: v8.4.0
192
192
-->
193
193
194
194
The ` '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
196
196
of the remote settings.
197
197
198
198
``` js
@@ -1725,7 +1725,7 @@ those to lower-case (e.g. `content-type`) upon transmission.
1725
1725
1726
1726
Header field-names * must only* contain one or more of the following ASCII
1727
1727
characters: ` a ` -` z ` , ` A ` -` Z ` , ` 0 ` -` 9 ` , ` ! ` , ` # ` , ` $ ` , ` % ` , ` & ` , ` ' ` , ` * ` , ` + ` ,
1728
- ` - ` , ` . ` , ` ^ ` , ` _ ` , `` (backtick), ` | ` , and ` ~ ` .
1728
+ ` - ` , ` . ` , ` ^ ` , ` _ ` , `` ` `` (backtick), ` | ` , and ` ~ ` .
1729
1729
1730
1730
Using invalid characters within an HTTP header field name will cause the
1731
1731
stream to be closed with a protocol error being reported.
@@ -1883,12 +1883,12 @@ const server = createSecureServer(
1883
1883
1884
1884
function onRequest (req , res ) {
1885
1885
// 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 ({
1890
1890
alpnProtocol,
1891
- httpVersion: request .httpVersion
1891
+ httpVersion: req .httpVersion
1892
1892
}));
1893
1893
}
1894
1894
```
0 commit comments