Commit Graph

5838 Commits

Author SHA1 Message Date
rstoyanchev e21fa380b3 Merge branch '6.2.x' 2025-10-10 17:25:22 +01:00
rstoyanchev 2c83144946 Use getRemoteAddr in ServletServerHttpRequest
Closes gh-35589
2025-10-10 17:24:48 +01:00
Sam Brannen d404fdafa0 Prevent ReactorResourceFactory from participating in pause scenarios
Prior to this commit, ReactorResourceFactory was not restarted properly
when the ApplicationContext was resumed by the TestContext Framework
after a context pause. The reason is that the managed LoopResources
were disposed when ConfigurableApplicationContext.pause() was invoked
and reacquired when ConfigurableApplicationContext.restart() was
invoked.

To address that, this commit overrides isPauseable() in
ReactorResourceFactory to return false, thereby avoiding participation
in pause scenarios.

Closes gh-35585
2025-10-08 15:48:20 +02:00
rstoyanchev e0b8cb4fe2 Allow setting ApiVersionInserter to null
It should be possible to reset this, e.g. after call to mutate
a client or a test client.
2025-10-08 13:52:14 +01:00
rstoyanchev 03e379b070 Improve Javadoc for use of ApiVersionInserter
Closes gh-35565
2025-10-08 12:24:37 +01:00
rstoyanchev 00543becf8 Allow explicitly sending no API version
Closes gh-35566
2025-10-08 12:24:37 +01:00
Sébastien Deleuze 891c3e3a1f Fix FilterProvider handling in AbstractJacksonEncoder
Closes gh-35575
2025-10-08 11:29:02 +02:00
rstoyanchev e11cb2d856 Improve converter config in RestClient.Builder
Internally maintain a chain of HttpMessageConverters.ClientBuilder
consumers in addition to the List of converters.

List based methods apply to the list.
HttpMessageConverters based methods are composed into a Consumer.

At build() time prepare a single HttpMessageConverters.ClientBuilder.
Insert list based converters first.
Apply HttpMessageConverters consumers after that.

Deprecate both List methods. Eventually, HttpMessageConverters should
be the main mechanism. In the mean time we layer them as described.

Closes gh-35578
2025-10-08 06:34:53 +01:00
Sam Brannen ff9a349271 Introduce findAnnotatedBeans(ListableBeanFactory) in ControllerAdviceBean
This commit introduces a new findAnnotatedBeans(ListableBeanFactory)
override for the existing findAnnotatedBeans(ApplicationContext) method.

Closes gh-35571
2025-10-07 12:37:07 +02:00
NeatGuyCoding 6aeb9d16e8 Fix Javadoc link and remove unnecessary semicolon
Closes gh-35573

Signed-off-by: NeatGuyCoding <15627489+NeatGuyCoding@users.noreply.github.com>
2025-10-06 16:54:08 +02:00
rstoyanchev 8a719117e3 Fix copy-paste error from recent change
See gh-35562
2025-10-03 09:21:55 +01:00
rstoyanchev 8631345b71 Refine Jackson 3 vs 2 setup in CodecConfigurer
Closes gh-35562
2025-10-02 17:35:33 +01:00
Brian Clozel d98179e137 Enforce custom string converter in HttpMessageConverters
Prior to this commit, configuring a custom `StringHttpMessageConverter`
would be overwritten when the `registerDefaults()` option is enabled.

Fixes gh-35563
2025-10-01 20:18:39 +02:00
rstoyanchev c765b035e5 Merge branch '6.2.x' 2025-10-01 16:14:13 +01:00
rstoyanchev b3264ec2a8 Fix typo 2025-10-01 16:13:40 +01:00
rstoyanchev f071f95899 Merge branch '6.2.x' 2025-10-01 14:46:47 +01:00
rstoyanchev a19b51b7e0 Handle invalid position in ResourceHttpMessageWriter
Closes gh-35536
2025-10-01 14:44:05 +01:00
rstoyanchev fbdece6759 Polishing in ResourceHttpMessageWriter
See gh-35536
2025-10-01 14:42:01 +01:00
rstoyanchev ba0de1edce Merge branch '6.2.x' 2025-09-25 12:22:29 +01:00
rstoyanchev e9fb5eb38a Respect forwarded path in UrlHandlerFilter
Closes gh-35509
2025-09-25 12:19:56 +01:00
Manu Sridharan e834a3a80c Nullability fixes for AtomicReference variables
Closes gh-35514
Signed-off-by: Manu Sridharan <msridhar@gmail.com>
2025-09-25 07:39:44 +02:00
rstoyanchev 5a858915ea Revise parsed path handling in UrlHandlerFilter
Closes gh-35538
2025-09-24 19:08:55 +01:00
Brian Clozel 20aac6dd8d Add Gson codecs for WebFlux
This commit adds new `GsonEncoder` and `GsonDecoder` for serializing and
deserializing JSON in a reactive fashion.

Because `Gson` itslef does not support decoding JSON in a non-blocking
way, the `GsonDecoder` does not support decoding to `Flux<*>` types.

Closes gh-27131
2025-09-23 17:09:41 +02:00
Sébastien Deleuze aa272b4cd9 Upgrade to Dokka 2.1.0-Beta
Required for Java 25 support.

Closes gh-35532
2025-09-23 15:57:21 +02:00
Sébastien Deleuze c79e4e230b Reinstantiate checks for kotlin-reflect
This commit reinstantiates checks for kotlin-reflect (via static final
fields for faster Java code paths and better native code removal) which
were removed as part of gh-34275, which did not consider the
increasingly popular use cases where kotlin-stdlib is present in the
classpath as a transitive dependency in Java applications.

Closes gh-35511
2025-09-22 18:33:38 +02:00
Sébastien Deleuze 7635ac38f6 Use uppercase for classpath-related static final field names
Closes gh-35525
2025-09-22 18:32:14 +02:00
Sam Brannen 0c61ac956b Add missing @⁠Override annotations
... and suppress "serial" warnings
2025-09-22 13:20:37 +02:00
rstoyanchev e9e19f5ed7 Update references to HTTP service clients in docs
Closes gh-35522
2025-09-22 11:35:46 +01:00
Sébastien Deleuze 79738d921a Upgrade to Jackson 3.0.0-rc10
See gh-35521
2025-09-22 11:16:25 +02:00
Brian Clozel c129e8a599 Merge branch '6.2.x' 2025-09-19 17:51:33 +02:00
Brian Clozel 0cc79ba366 Catch EOFException in IntrospectingClientHttpResponse
Prior to this commit, the `IntrospectingClientHttpResponse` would try
and read the HTTP response stream in order to check for the presence of
a non-empty message body.

Developers reported that in some cases, an `EOFException` is thrown
instead of returning -1 from the `read()` method. This commit ensures
that this case is taken into account and that we report the response as
an empty body in these cases.

Closes gh-35361
2025-09-19 17:49:12 +02:00
Sébastien Deleuze da0a36bfd6 Upgrade to NullAway 0.12.10 and refine nullability
Closes gh-35492
2025-09-17 15:17:23 +02:00
rstoyanchev c7121d048c Replace X-API-Version with API-Version
Closes gh-35494
2025-09-17 11:48:49 +01:00
Sébastien Deleuze 84bd44e5de Use nullable body consistently in HttpClientErrorException
Closes gh-35482
2025-09-15 10:18:04 +02:00
rstoyanchev dd60fddaf0 Always process SSE "data:" line
ServerSentEventHttpMessageReader now always processes "data:"
lines, including empty lines, as per SSE spec.

Closes gh-35412
2025-09-10 16:22:23 +01:00
Sébastien Deleuze 563dccbbda Add debug logging when no CORS configuration
Closes gh-35314
2025-09-09 15:53:34 +02:00
Juergen Hoeller ba52164373 Provide graceful fallback for non-default NIO file systems
Closes gh-35443
2025-09-08 17:28:45 +02:00
Juergen Hoeller 27221581a1 Expose getFilePath() on Resource interface for consistent NIO support
Closes gh-35435
2025-09-08 17:03:07 +02:00
rstoyanchev 736383e6cb Remove HttpServiceClient annotation
Closes gh-35431
2025-09-08 13:56:07 +01:00
rstoyanchev 10a288c986 Polishing in StatusHandler
See gh-35391
2025-09-02 15:38:03 +01:00
Johnny Lim d32b7e9b4a Polish gh-35358
Signed-off-by: Johnny Lim <izeye@naver.com>
2025-09-02 23:13:27 +09:00
Sam Brannen 6dc5bf7634 Clean up warnings related to deprecated HttpStatus values, etc. 2025-09-02 12:50:57 +02:00
Brian Clozel 942fbf3032 Polishing contribution
Closes gh-34683
2025-09-01 11:50:22 +02:00
Mengqi Xu 7b3c4e5893 Add support for Forwarded By HTTP headers
See gh-34683

Signed-off-by: Mengqi Xu <2663479778@qq.com>
2025-09-01 11:49:59 +02:00
Brian Clozel 9979de99fd Do not decompress HTTP responses when compression disabled
This commit refines changes made in gh-35225 so as to not decompress
HTTP responses if decompression support is not enabled.

Closes gh-35225
2025-08-29 16:47:58 +02:00
rstoyanchev 441b14b0c1 Handle error responses in RestClientAdapter
Closes gh-35375
2025-08-29 16:04:45 +03:00
rstoyanchev f22d1eab23 Add createException to ConvertibleClientHttpResponse
Closes gh-35391
2025-08-29 16:04:45 +03:00
rstoyanchev 21e6d7392d Re-order methods and polishing
In StatusHandler and DefaultConvertibleClientHttpResponse.

See gh-35391
2025-08-29 16:04:45 +03:00
rstoyanchev 11cb062357 Assert versionRequired and defaultVersion
Closes gh-35387
2025-08-28 15:50:33 +03:00
rstoyanchev a7e3a438c9 Correctly apply required API version validation
Closes gh-35386
2025-08-28 15:50:33 +03:00