# std.crypto.tls.Client: make close_notify optional · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/7178451d6258d9d04fdf03269478948643c39f02)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 7178451d6258d9d04fdf03269478948643c39f02

Requested commit: 7178451d6258d9d04fdf03269478948643c39f02

Commit: 7178451d6258d9d04fdf03269478948643c39f02

Tree: aaad703aa158587ef6dee320bd1cf28e7a0f7b2b

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.crypto.tls.Client: make close_notify optional

Although RFC 8446 states:

> Each party MUST send a "close_notify" alert before closing its write
> side of the connection

In practice many servers do not do this. Also in practice, truncation
attacks are thwarted at the application layer by comparing the amount of
bytes received with the amount expected via the HTTP headers.

```

## Parents

- [9ca6d673457723548d8fe721b44499817ead1d2d](https://git.cafe/gitcafe/zig/commit/9ca6d673457723548d8fe721b44499817ead1d2d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/7178451d6258d9d04fdf03269478948643c39f02?format=markdown)
