The CancelRequest test was observed failing again after [JDK-8294916](https://bugs.openjdk.org/browse/JDK-8294916) was integrated: there is a small race condition window in the code that unregisters the request BodySubscriber when a request is cancelled: if the request cancellation happens after the body subscriber is registered but before it is subscribed it may not be unregistered.
The solution is to register it only after it has been successfully subscribed. ------------- Commit messages: - 8296889 Changes: https://git.openjdk.org/jdk/pull/11110/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11110&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8296889 Stats: 27 lines in 4 files changed: 21 ins; 2 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/11110.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11110/head:pull/11110 PR: https://git.openjdk.org/jdk/pull/11110