Debian Codegraph @

docs/discussion/flow.rst

raw
1 Flow
2 ====
3
4 These are the expected event flows/sequences.
5
6 H11/H2
7 ------
8
9 A typical HTTP/1 or HTTP/2 request with response with the connection
10 specified to close on response.
11
12 .. mermaid::
13
14 sequenceDiagram
15 TCPServer->>H11/H2: RawData
16 H11/H2->>HTTPStream: Request
17 H11/H2->>HTTPStream: Body
18 HTTPStream->>App: http.request[more_body=True]
19 H11/H2->>HTTPStream: EndBody
20 HTTPStream->>App: http.request[more_body=False]
21 App->>HTTPStream: http.response.start
22 App->>HTTPStream: http.response.body
23 HTTPStream->>H11/H2: Response
24 H11/H2->>TCPServer: RawData
25 HTTPStream->>H11/H2: Body
26 H11/H2->>TCPServer: RawData
27 HTTPStream->>H11/H2: EndBody
28 H11/H2->>TCPServer: RawData
29 H11/H2->>HTTPStream: StreamClosed
30 HTTPStream->>App: http.disconnect
31 H11/H2->>TCPServer: Closed
32
33
34 H11 early client cancel
35 -----------------------
36
37 The flow as expected if the connection is closed before the server has
38 the opportunity to respond.
39
40 .. mermaid::
41
42 sequenceDiagram
43 TCPServer->>H11/H2: RawData
44 H11/H2->>HTTPStream: Request
45 H11/H2->>HTTPStream: Body
46 HTTPStream->>App: http.request[more_body=True]
47 TCPServer->>H11/H2: Closed
48 H11/H2->>HTTPStream: StreamClosed
49 HTTPStream->>App: http.disconnect