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.
This commit is contained in:
Andrew Kelley 2022-12-30 20:26:49 -07:00
parent 611a1fdd6d
commit 3127bd79fb

View File

@ -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);
},
}
}