-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: in the server, modifying the response headers after they have been sent should raise #3231
Comments
I have no strong opinion. |
I agree that the type should stay the same. Ideally, the |
Let me sleep on it. |
As an option, we can use multidict's version number: store it on headers sending and compare with the current value on exiting from web-handler. |
I think not providing the right stacktrace is a deal breaker, especially
when we could provide it.
Using a warning instead of making this an error immediately is a good idea
of course, to avoid a breaking change
…On Tue, 4 Sep 2018 at 15:01, Andrew Svetlov ***@***.***> wrote:
As an option, we can use multidict's version number: store it on headers
sending and compare with the current value on exiting from web-handler.
If numbers are different -- raise a warning or something like this.
Not ideal (no stack trace pointing on the bad code) but better than
nothing.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3231 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA7ajj5Kxs9CLzOoV1Pc2ixdeaauhH0vks5uXnnAgaJpZM4WVPRt>
.
|
Simple feature: I think after the response has been prepared (ie after the headers are sent back to the client), the
Response.headers
object should become a read-only dict (ie aCIMultiDictProxy
), so that it cannot be modified.Would you accept a patch doing this?
The text was updated successfully, but these errors were encountered: