authorgravatar for truemedian@gmail.comNameless <truemedian@gmail.com> 2023-05-06 21:35:04-05:00
committergravatar for truemedian@gmail.comNameless <truemedian@gmail.com> 2023-05-06 21:35:17-05:00
log9017d758b96c1f296249670dffb774a598bc8598
treeab3702fd1794a326cce8b98b8b46e96fc7b1947e
parent1b3ebfefd8d8fd05152d55c431f741880d1ce2a7
signaturelock-open Commit is signed but in an unrecognized format.

std.http: use larger read buffer to hit faster tls code


2 files changed, 2 insertions(+), 2 deletions(-)

lib/std/http/Client.zig+1-1
...@@ -251,7 +251,7 @@ pub const Connection = struct {...@@ -251,7 +251,7 @@ pub const Connection = struct {
251251
252/// A buffered (and peekable) Connection.252/// A buffered (and peekable) Connection.
253pub const BufferedConnection = struct {253pub const BufferedConnection = struct {
254 pub const buffer_size = 0x2000;254 pub const buffer_size = std.crypto.tls.max_ciphertext_record_len;
255255
256 conn: Connection,256 conn: Connection,
257 read_buf: [buffer_size]u8 = undefined,257 read_buf: [buffer_size]u8 = undefined,
lib/std/http/Server.zig+1-1
...@@ -95,7 +95,7 @@ pub const Connection = struct {...@@ -95,7 +95,7 @@ pub const Connection = struct {
9595
96/// A buffered (and peekable) Connection.96/// A buffered (and peekable) Connection.
97pub const BufferedConnection = struct {97pub const BufferedConnection = struct {
98 pub const buffer_size = 0x2000;98 pub const buffer_size = std.crypto.tls.max_ciphertext_record_len;
9999
100 conn: Connection,100 conn: Connection,
101 read_buf: [buffer_size]u8 = undefined,101 read_buf: [buffer_size]u8 = undefined,