authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-12-30 20:26:49-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-01-02 16:57:16-07:00
log3127bd79fb8106c3fdf487486c686a0551c5efa8
treea3a24020ea7716c387c4bc7e49b1280070743aa6
parent611a1fdd6df81a95a74162a0ebdd5afba94d29d4

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.

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

lib/std/http/Client.zig+1-1
...@@ -47,7 +47,7 @@ pub const Request = struct {...@@ -47,7 +47,7 @@ pub const Request = struct {
47 try req.stream.writeAll(req.headers.items);47 try req.stream.writeAll(req.headers.items);
48 },48 },
49 .https => {49 .https => {
50 try req.tls_client.writeAllEnd(req.stream, req.headers.items, true);50 try req.tls_client.writeAll(req.stream, req.headers.items);
51 },51 },
52 }52 }
53 }53 }