From 3127bd79fb8106c3fdf487486c686a0551c5efa8 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 30 Dec 2022 20:26:49 -0700 Subject: [PATCH] std.http.Client: don't send TLS close_notify It appears to be implemented incorrectly in the wild and causes the read connection to be closed even though that is a direct violation of RFC 8446 Section 6.1. The writeEnd function variants are still there, ready to be used. --- lib/std/http/Client.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/http/Client.zig b/lib/std/http/Client.zig index 33df40866a..efae62680d 100644 --- a/lib/std/http/Client.zig +++ b/lib/std/http/Client.zig @@ -47,7 +47,7 @@ pub const Request = struct { try req.stream.writeAll(req.headers.items); }, .https => { - try req.tls_client.writeAllEnd(req.stream, req.headers.items, true); + try req.tls_client.writeAll(req.stream, req.headers.items); }, } }