-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix response leak that can be caused by an exception during redirect (#…
…3095) Motivation: `RedirectConfig` accepts user-defined functions and it's possible that some of them can throw. `RedirectSingle` expects it and applies a `try-catch` block, but we forgot to drain the response payload body before propagating the error. Modifications: - Drain response payload before propagating an exception during redirect processing; - Enhance tests to validate expected behavior; Result: We do not leave undrained response payload if redirect fails with an exception.
- Loading branch information
1 parent
e8d18ff
commit eebe458
Showing
2 changed files
with
60 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters