-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DHIS2-18568: allow Route response timeout to be customised (#19872)
* feat(DHIS2-18568): allow response timeout to be customised perf: use non-blocking WebClient instead of RestTemplate * fix: persist response timeout tolerate HTTP errors in WebClient test: add test coverage for response timeout and HTTP errors * fix: validate response timeout * fix: solve SonarQube issues * style: format * fix: update to newer patch version of Spring to solve reported security issues * fix: validate Route response time update * fix: handle max body size * refactor: eliminate code smell * refactor: add DB constraint * refactor: rename responseTimeout to responseTimeoutSeconds use int instead of Integer for responseTimeout to remove null checks remove redundant annotations rename references use `Json.object` instead handcrafting JSON in RouteService * fix(security): reduce default to 5s after conversation with @amcgee * perf: stream request and response bodies feat: support binary bodies * refactor: follow-up PR comments * fix: filter response headers * style: reformat * refactor: drop error handing for DataBufferLimitException since it can't happen anymore due to streaming * refactor: drop redundant close on output stream * touch * style: reformat * fix: clean up resources and bump request buffer size * chore: update dependencies to fix reported security issues * fix: limit total transfer time to 5 mins
- Loading branch information
Showing
11 changed files
with
429 additions
and
120 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
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
1 change: 1 addition & 0 deletions
1
...rc/main/resources/org/hisp/dhis/db/migration/2.42/V2_42_36__Add_responsetimeout_route.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE route ADD COLUMN IF NOT EXISTS responsetimeoutseconds INTEGER NOT NULL DEFAULT 5 CHECK (responsetimeoutseconds > 0 AND responsetimeoutseconds <= 60); |
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
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
Oops, something went wrong.