ring-clojure / ring

Clojure HTTP server abstraction
MIT License
3.75k stars 519 forks source link

Fix response streaming in case of error #422

Closed lightZebra closed 3 years ago

lightZebra commented 3 years ago

OutputStream will not be closed in case of error so underlying server could handle it properly. Fixed issue: termination chunk was send after streaming interruption by error.

Fixes #420.

atomist[bot] commented 3 years ago

Commit messages of this repository should follow the seven rules of a great Git commit message, as mentioned in the project's contributing guidelines. It looks like there's a few issues with the commit messages in this pull request:

atomist[bot] commented 3 years ago

Commit messages of this repository should follow the seven rules of a great Git commit message, as mentioned in the project's contributing guidelines. It looks like there's a few issues with the commit messages in this pull request:

lightZebra commented 3 years ago

@weavejester do we need to changes anything else?

weavejester commented 3 years ago

The code looks fine. Could you change the commit message to:

Remove closing of response stream on exception

When an exception occurs, the response output stream should not
automatically be closed, as that prevents the adapter from changing the
output of the stream to handle the exception.

Fixes #420.
lightZebra commented 3 years ago

@weavejester commit message updated

weavejester commented 3 years ago

Great, thanks!

lightZebra commented 3 years ago

Thank you