1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* src/layers/l7/http/protocol_data.rs */
use Any;
use OnUpgrade;
use crateProtocolData;
/// HTTP-specific protocol extension data.
///
/// This structure stores HTTP/1.1 WebSocket upgrade handles that are not
/// applicable to other L7 protocols (DNS, gRPC, etc.).
///
/// # Fields
///
/// - `client_upgrade`: WebSocket upgrade handle from the client connection.
/// Populated by the HTTP adapter when detecting an Upgrade request.
/// Consumed by the Response terminator to establish a bidirectional tunnel.
///
/// - `upstream_upgrade`: WebSocket upgrade handle from the upstream server.
/// Populated by FetchUpstream when the backend responds with HTTP 101.
/// Consumed by the Response terminator to establish a bidirectional tunnel.
///
/// # Design Note
///
/// This data is only relevant for HTTP/1.1 connections with WebSocket upgrades.
/// HTTP/2 and HTTP/3 do not use this mechanism (they have native bidirectional streams).