This commit merges the implementations of getCallableInterceptors()
and getDeferredResultInterceptors() in order to remove code duplication.
Closes gh-24305
Prior to this commit, when WebFlux handlers added `"Content-*"` response
headers and an error happened while handling the request, all those
headers would not be cleared from the response before error handling.
This commit clears those headers from the response in two places:
* when invoking the handler and adapting the response
* when writing the response body
Not removing those headers might break HTTP clients since they're given
wrong information about how to interpret the HTTP response body: the
error response body might be very different from the original one.
Fixes gh-24238
Prior to this series of commits, the Spring Framework build used a
custom TestSourcesPlugin to share test utilities and fixtures between
projects. This plugin served its purpose; however, it also had its
drawbacks:
- All test code was visible in all other (downstream) projects, and that
made it too easy to introduce unnecessary coupling. For example,
this made it more difficult to migrate to JUnit Jupiter.
This commit addresses such issues by migrating to Gradle's first-class
support for "Java test fixtures".
- Having test fixture code in a dedicated source folder makes it
readily apparent that the code is reused across the test suite.
- The build is now much cleaner since projects explicitly declare that
they rely on specific test fixtures of upstream projects.
- Incremental builds are now much faster on average since downstream
projects no longer have to be recompiled due to changes in tests in
upstream projects.
- Prior to these commits we effectively had around 20 test fixture
dependencies. With these commits we effectively now have only 7 test
fixture dependencies (i.e., projects that share test fixtures).
Closes gh-23550
Prior to this commit, WebFlux application would keep the quality
parameter from the "Accept" request header when selecting a media type
for the response. It would then echo it back to the client.
While strictly not wrong, this is unnecessary and can confuse HTTP
clients. This commit aligns WebFlux's behavior with Spring MVC.
Fixes gh-24239
Add a note on encoding for query parameters specifically mentioning the
"+" sign and a link to the reference docs.
Also remove duplicate Javadoc in UriComponentsBuilder which is already
inherited from UriBuilder.