diff --git a/lib/std/http/Client.zig b/lib/std/http/Client.zig index 77f4c6c6c3..023bdd28bc 100644 --- a/lib/std/http/Client.zig +++ b/lib/std/http/Client.zig @@ -251,7 +251,7 @@ pub const Connection = struct { /// A buffered (and peekable) Connection. pub const BufferedConnection = struct { - pub const buffer_size = 0x2000; + pub const buffer_size = std.crypto.tls.max_ciphertext_record_len; conn: Connection, read_buf: [buffer_size]u8 = undefined, diff --git a/lib/std/http/Server.zig b/lib/std/http/Server.zig index 2d3032bcdb..6b5db6725f 100644 --- a/lib/std/http/Server.zig +++ b/lib/std/http/Server.zig @@ -95,7 +95,7 @@ pub const Connection = struct { /// A buffered (and peekable) Connection. pub const BufferedConnection = struct { - pub const buffer_size = 0x2000; + pub const buffer_size = std.crypto.tls.max_ciphertext_record_len; conn: Connection, read_buf: [buffer_size]u8 = undefined,