Skip to content

Commit 7c3d8bf

Browse files
committed
f - Increase MAX_HTTP_MESSAGE_BODY_SIZE to account for overhead
1 parent 826ba23 commit 7c3d8bf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lightning-block-sync/src/http.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ const TCP_STREAM_TIMEOUT: Duration = Duration::from_secs(5);
2424
/// Maximum HTTP message header size in bytes.
2525
const MAX_HTTP_MESSAGE_HEADER_SIZE: usize = 8192;
2626

27-
/// Maximum HTTP message body size in bytes. Enough for a hex-encoded block in JSON format.
28-
const MAX_HTTP_MESSAGE_BODY_SIZE: usize = 2 * 4_000_000 + 64;
27+
/// Maximum HTTP message body size in bytes. Enough for a hex-encoded block in JSON format and any
28+
/// overhead for HTTP chunked transfer encoding.
29+
const MAX_HTTP_MESSAGE_BODY_SIZE: usize = 2 * 4_000_000 + 32_000;
2930

3031
/// Endpoint for interacting with an HTTP-based API.
3132
#[derive(Debug)]

0 commit comments

Comments
 (0)