◐ Shell
clean mode source ↗

gh-144125: email: verify headers are sound in BytesGenerator by sethmlarson · Pull Request #144126 · python/cpython

pythonGH-122233 added an implementation to `Generator`
to refuse to serialize (write) headers that
are unsafely folded or delimited.

This revision adds the same implementation
to `BytesGenerator`, so it gets the same safety protections
for unsafely folded or delimited headers

Co-authored-by: Denis Ledoux <5822488+beledouxdenis@users.noreply.github.com>
Co-authored-by: Petr Viktorin <302922+encukou@users.noreply.github.com>
Co-authored-by: Bas Bloemsaat <1586868+basbloemsaat@users.noreply.github.com>

@sethmlarson

bitdancer

@sethmlarson

bitdancer

@sethmlarson sethmlarson deleted the email-verify-headers-in-bytesgenerator branch

January 23, 2026 14:59

This was referenced

Mar 13, 2026