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

4.x: Fix problem where throwing an Error would close connection but send keep-alive #9014

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

tomas-langer
Copy link
Member

Resolves #9013

  • ErrorHandlers now handle Throwable instead of just Exception - this is the signature of ErrorHandler and also covers user specific Error classes
  • Http1Connection now sends Connection: close if an exception is caught outside of the handle loop, as the connection is always terminated after this

The second case cannot have an integration test easily written, as it is specifically for handling unexpected exceptions outside of routing.

The HTTP/1.1 connection now correctly sends Connection: close header on throwables that cause the connection to be closed.
@tomas-langer tomas-langer added bug Something isn't working webserver labels Jul 19, 2024
@tomas-langer tomas-langer added this to the 4.0.11 milestone Jul 19, 2024
@tomas-langer tomas-langer self-assigned this Jul 19, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 19, 2024
@tomas-langer tomas-langer merged commit 830b3eb into helidon-io:main Jul 19, 2024
12 checks passed
@tomas-langer tomas-langer deleted the 9013-connection-close branch July 19, 2024 17:48
barchetta pushed a commit to barchetta/helidon that referenced this pull request Jul 19, 2024
…end keep-alive (helidon-io#9014)

* Fix wrong keep alive when error happens.

* Error handlers now correctly handle Throwable and not just Exception.
The HTTP/1.1 connection now correctly sends Connection: close header on throwables that cause the connection to be closed.
barchetta added a commit that referenced this pull request Jul 19, 2024
…end keep-alive (#9014) (#9016)

* Fix wrong keep alive when error happens.

* Error handlers now correctly handle Throwable and not just Exception.
The HTTP/1.1 connection now correctly sends Connection: close header on throwables that cause the connection to be closed.

Co-authored-by: Tomas Langer <tomas.langer@oracle.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working OCA Verified All contributors have signed the Oracle Contributor Agreement. webserver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.x: Error handling closes connection after sending keep-alive
3 participants