You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modify update-undici.sh to fetch all releases and filter to only v7.x
releases, then select the latest one. This ensures we stay on the v7.x
line and don't accidentally upgrade to v8 or later.
The `handshakeResponse` object contains the HTTP response that upgraded the connection to WebSocket:
193
+
The `handshakeResponse` object contains the HTTP response that established the WebSocket connection:
194
194
195
-
-`status` (number): The HTTP status code (101 for successful WebSocket upgrade)
196
-
-`statusText` (string): The HTTP status message ('Switching Protocols' for successful upgrade)
195
+
-`status` (number): The HTTP status code (`101` for HTTP/1.1 upgrade, `200` for HTTP/2 extended CONNECT)
196
+
-`statusText` (string): The HTTP status message (`'Switching Protocols'` for HTTP/1.1, commonly `'OK'` for HTTP/2 in Node.js)
197
197
-`headers` (object): The HTTP response headers from the server, including:
198
+
-`sec-websocket-accept` and other WebSocket-related headers
198
199
-`upgrade: 'websocket'`
199
200
-`connection: 'upgrade'`
200
-
-`sec-websocket-accept` and other WebSocket-related headers
201
+
202
+
The `upgrade` and `connection` headers are only present for HTTP/1.1 handshakes.
201
203
202
204
This information is particularly useful for debugging and monitoring WebSocket connections, as it provides access to the initial HTTP handshake response that established the WebSocket connection.
Copy file name to clipboardExpand all lines: deps/undici/src/docs/docs/api/Dispatcher.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -364,7 +364,7 @@ client.dispatch({
364
364
365
365
### `Dispatcher.pipeline(options, handler)`
366
366
367
-
For easy use with [stream.pipeline](https://nodejs.org/api/stream.html#stream_stream_pipeline_source_transforms_destination_callback). The `handler` argument should return a `Readable` from which the result will be read. Usually it should just return the `body` argument unless some kind of transformation needs to be performed based on e.g. `headers` or `statusCode`. The `handler` should validate the response and save any required state. If there is an error, it should be thrown. The function returns a `Duplex` which writes to the request and reads from the response.
367
+
For easy use with [stream.pipeline](https://nodejs.org/api/stream.html#streampipelinesource-transforms-destination-options). The `handler` argument should return a `Readable` from which the result will be read. Usually it should just return the `body` argument unless some kind of transformation needs to be performed based on e.g. `headers` or `statusCode`. The `handler` should validate the response and save any required state. If there is an error, it should be thrown. The function returns a `Duplex` which writes to the request and reads from the response.
-**dispatch**`function` - The dispatch function to be called after every retry.
10
10
-**maxRedirections**`number` - Maximum number of redirections allowed.
11
11
-**opts**`object` - Options for handling redirection.
12
12
-**handler**`object` - An object containing handlers for different stages of the request lifecycle.
13
-
-**redirectionLimitReached**`boolean` (default: `false`) - A flag that the implementer can provide to enable or disable the feature. If set to `false`, it indicates that the caller doesn't want to use the feature and prefers the old behavior.
14
13
15
14
Returns: `RedirectHandler`
16
15
@@ -20,7 +19,6 @@ Returns: `RedirectHandler`
20
19
-**maxRedirections**`number` (required) - Maximum number of redirections allowed.
21
20
-**opts**`object` (required) - Options for handling redirection.
22
21
-**handler**`object` (required) - Handlers for different stages of the request lifecycle.
23
-
-**redirectionLimitReached**`boolean` (default: `false`) - A flag that the implementer can provide to enable or disable the feature. If set to `false`, it indicates that the caller doesn't want to use the feature and prefers the old behavior.
24
22
25
23
### Properties
26
24
@@ -30,7 +28,6 @@ Returns: `RedirectHandler`
30
28
-**maxRedirections**`number` - Maximum number of redirections allowed.
31
29
-**handler**`object` - Handlers for different stages of the request lifecycle.
32
30
-**history**`Array` - An array representing the history of URLs during redirection.
33
-
-**redirectionLimitReached**`boolean` - Indicates whether the redirection limit has been reached.
0 commit comments