Skip to content
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

Mlstubblefield fix/stream closed too early #1671

Conversation

mlstubblefield
Copy link
Contributor

In the company I work for, we usually log out the request body if an error has occurred. We do this by reading the respones stream off of the http context in a separate middleware. This isn't possible currently in hotchocolate due to the HttpPostMiddleware closing the stream (arguably when it should not). I made a change so that the stream remains to be open and owned by asp.net.

Happy to build upon this/give more context as needed :)

Also random question, would this impact other middleware handlers in the solution? I did some initial searching, but only found this place where I needed to change it.

@PascalSenn PascalSenn added 🎨 refactoring This issue is about doing refactoring work, like cleaning up the code making existing code better. 🌶 hot chocolate and removed 🎨 refactoring This issue is about doing refactoring work, like cleaning up the code making existing code better. labels Apr 9, 2020
@rstaib
Copy link
Member

rstaib commented Apr 10, 2020

First of all, thank you for fixing this. We will include this fix into the next 10.4 hotfix release. For version 11 we are going to rewrite all middlewares completely.

@michaelstaib michaelstaib self-assigned this Apr 10, 2020
@michaelstaib michaelstaib added this to the HC-11.0.0 milestone Apr 10, 2020
@michaelstaib
Copy link
Member

@PascalSenn @rstaib I will bring this into the master and than copy this change over to 10.

@michaelstaib michaelstaib merged commit ccec08a into ChilliCream:master Apr 10, 2020
@michaelstaib
Copy link
Member

@mlstubblefield thanks for contributing:

@mlstubblefield mlstubblefield deleted the mlstubblefield-fix/stream-closed-too-early branch April 10, 2020 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants