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
//! Policy for handling incomplete request bodies.
//!
//! When a handler returns without fully consuming the body, the runtime
//! closes the connection. Active drain is not safely implementable
//! because the body stream is consumed into the `Request` envelope by
//! value and is no longer accessible from the connection pipeline after
//! service invocation. Hyper handles cleanup of unconsumed body bytes.
/// Policy for handling incomplete request bodies.
///
/// When a handler returns without fully consuming the request body,
/// the runtime applies this policy to determine the connection outcome.
///
/// Only [`Close`](IncompleteBodyPolicy::Close) is supported. The body
/// stream is owned by the `Request` envelope passed to `Service::call`
/// by value. After the service returns, the body is no longer accessible
/// from the connection pipeline, making active drain architecturally
/// unsafe. Hyper cleans up unconsumed bytes by closing the connection.