Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Throw InvalidOperationException if the user tries to modify response headers after the body starts #628

Closed
Tratcher opened this issue Feb 12, 2016 · 3 comments

Comments

@Tratcher
Copy link
Member

Sometimes users accidentally set response headers after the response starts and it can be very hard to debug why the client did not receive the header.
aspnet/Mvc#4065 (comment)

Throw an InvalidOperationException if the user tries to modify response headers after the first write to the body.

WebListener already does this. Helios used to as well.

@benaadams
Copy link
Contributor

Readonly or full on disposed?

@Tratcher
Copy link
Member Author

readonly, you may still want to enumerate and log them

benaadams added a commit to benaadams/KestrelHttpServer that referenced this issue Feb 13, 2016
@benaadams
Copy link
Contributor

Is in #608

@halter73 halter73 added this to the 1.0.0-rc2 milestone May 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants