Skip to content

Commit 41b7ed6

Browse files
committed
Upgrade tlz.zig to latest version
Was seeing pretty frequent TLS errors on reddit. I think I had the wrong max TLS record size, but figured this was an opportunity to upgrade tls.zig, which has seen quite a few changes since our last upgrade. Specifically, the nonblocking TLS logic has been split into two structs: one for handshaking, and then another to be used to encrypt/decrypt after the h andshake is complete. The biggest impact here is with respect to keepalive, since what we want to keepalive is the connection post-handshake, but we don't have this object until much later. There was also some general API changes, with respect to state and partially encrypted/decrypted data which we must now maintain.
1 parent 7a311a1 commit 41b7ed6

File tree

3 files changed

+183
-105
lines changed

3 files changed

+183
-105
lines changed

build.zig.zon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
.fingerprint = 0xda130f3af836cea0,
66
.dependencies = .{
77
.tls = .{
8-
.url = "https://github.com/ianic/tls.zig/archive/b29a8b45fc59fc2d202769c4f54509bb9e17d0a2.tar.gz",
9-
.hash = "tls-0.1.0-ER2e0uAxBQDm_TmSDdbiiyvAZoh4ejlDD4hW8Fl813xE",
8+
.url = "https://github.com/ianic/tls.zig/archive/8250aa9184fbad99983b32411bbe1a5d2fd6f4b7.tar.gz",
9+
.hash = "tls-0.1.0-ER2e0pU3BQB-UD2_s90uvppceH_h4KZxtHCrCct8L054",
1010
},
1111
.tigerbeetle_io = .{
1212
.url = "https://github.com/lightpanda-io/tigerbeetle-io/archive/61d9652f1a957b7f4db723ea6aa0ce9635e840ce.tar.gz",

src/browser/mime.zig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@ pub const Mime = struct {
218218

219219
fn parseAttributeValue(arena: Allocator, value: []const u8) ![]const u8 {
220220
if (value[0] != '"') {
221-
return value;
221+
// almost certainly referenced from an http.Request which has its
222+
// own lifetime.
223+
return arena.dupe(u8, value);
222224
}
223225

224226
// 1 to skip the opening quote

0 commit comments

Comments
 (0)