Read-Only functionality for HTTP::Headers #8712
Labels
good first issue
This is an issue suited for newcomers to become aquianted with working on the codebase.
help wanted
This issue is generally accepted and needs someone to pick it up
kind:feature
status:accepted
topic:stdlib
As soon as the response body receives a write call, the response headers are written to the socket. It says as much in the docs.
This is a suggestion that, in my opinion, would save a lot of devs from headache:
As soon as the response body is written the headers are set into a read-only mode, after which setting headers will raise exceptions.
I had a hard time debugging why it looks like i've set the correct response headers but none of them is sent to the client. This is increasingly hard when using web frameworks that handle the request life cycle for you.
The text was updated successfully, but these errors were encountered: