Commit Graph

29845 Commits

Author SHA1 Message Date
Sébastien Deleuze 2ab0101b8a Add coroutine context tests for WebClientExtensions
Closes gh-33548
2024-09-25 12:14:50 +02:00
Illia Sorokoumov 478aa250a0 Preserve coroutine context in WebClientExtensions
See gh-33548
2024-09-25 11:46:30 +02:00
Sam Brannen 5cc4d0a2ca Do not invoke AotTestExecutionListener for @⁠DisabledInAotMode tests
Closes gh-33589
2024-09-24 16:47:48 +02:00
Sam Brannen 602ac903ff Upgrade to JUnit 5.10.4 2024-09-24 15:39:53 +02:00
Sam Brannen af3a26ab06 Clean up warnings in Gradle build 2024-09-24 12:33:35 +02:00
Sam Brannen 1cecf52883 Upgrade to Apache HttpCore Reactive 5.3
Closes gh-33588
2024-09-24 12:21:50 +02:00
Sam Brannen 88905ea20d Upgrade to Apache HttpClient 5.4
This commit also updates the external Javadoc link to avoid the following
warning in the build.

URL https://hc.apache.org/httpcomponents-client-5.2.x/current/httpclient5/apidocs/package-list was redirected to https://hc.apache.org/httpcomponents-client-5.4.x/current/httpclient5/apidocs/package-list

Closes gh-33587
2024-09-24 12:20:44 +02:00
Simon Baslé 7df9db3bb7 Polishing test
Assert that BlockHound doesn't trigger, rather than assertions on a
condition that makes the test flakky because concurrency is involved.
2024-09-24 11:01:37 +02:00
Sam Brannen bd9c05a909 Upgrade to Gradle 8.10.2
Closes gh-33584
2024-09-24 10:46:58 +02:00
Andrey Popov 94c04821ff Use correct method to check encoded resource path
Closes: gh-33568
2024-09-20 09:32:24 +01:00
Brian Clozel 776811bdb8 Defer ExchangeFilterFunction execution in WebClient
Prior to this commit, the `DefaultWebClient` would execute the configured
`ExchangeFilterFunction` as the reactive pipeline is assembled during
subscription. This means that if imperative code is executed in a filter
function, it won't be aware of the current observation through the local
scope.

For example, when automatic context propagation is enabled for Reactor
operators, the logger MDC will not know about the current
traceId/spanId.

This commit ensures that client filter functions execution is deferred
during the actual client exchange.

Fixes gh-33559
2024-09-18 11:18:17 +02:00
Simon Baslé de4ff4b44b Polishing tests
This commit adds more test coverage of SpringCoreBlockHoundIntegration.

See gh-33450
2024-09-17 16:40:40 +02:00
Simon Baslé f6e96a24d4 Add BlockHound exception for ConcurrentReferenceHashMap$ReferenceManager
This commit adds a SpringCoreBlockHoundIntegration configuration to
allows `pollForPurge` method to block.

Closes gh-33450
2024-09-17 16:40:40 +02:00
Antoine Rey daea92397f Reference the spring-framework-petclinic repository
Closes gh-33539
2024-09-16 16:58:34 +02:00
Brian Clozel 5efb385e64 Read Expires cookie attribute in HttpComponents connector
Prior to this commit, the HttpComponents implementation for the
`WebClient` would only consider the max-age attribute of response
cookies when parsing the response. This is not aligned with other client
implementations that consider the max-age attribute first, and then the
expires if the former was not present. The expires date is then
translated into a max-age duration. This behavior is done naturally by
several implementations.

This commit updates the `HttpComponentsClientHttpResponse` to do the
same.

Fixes gh-33157
2024-09-13 15:49:06 +02:00
Sam Brannen b388ff60dd Fix parameterized test display names and polishing 2024-09-13 15:26:56 +02:00
Brian Clozel 412f5f677b Fix NPEs in MimeMessageHelper when adding files without names
Prior to this commit, `MimeMessageHelper` would accept `Resource`
instances as inline attachments in multipart MIME messages. If the
provided `Resource` implementation returns `null` for `getFileName()`,
the `addInLine` method would fail with a `NullPointerException` as
Jakarta activation fails to detect the content type for a null filename.

This commit falls back on "application/octet-stream" when the filename
is not known for the given resource instead of failing with an
exception.

Fixes gh-33527
2024-09-13 10:17:58 +02:00
Brian Clozel 6a20987933 Add missing URI template variables in RedirectViews
Prior to this commit, the URL handler mapping would expose the matching
pattern, the path within mapping and matching URI variables as request
attributes. This was the case when the mapping would use the
`AntPathMatcher` as matching infrastructure, but not when using the
`PathPattern` variant. In this case, the map of URI variables would be
`null`. This could throw `IllegalArgumentException` when `RedirectView`
instances were relying on the presence of specific variables.

This commit ensures that URI variables are also extracted when the
`PathPatternParser` is used.

Fixes gh-33422
2024-09-13 09:28:45 +02:00
Stéphane Nicoll 2ae62dec8c Next development version (v6.1.14-SNAPSHOT) 2024-09-12 14:11:01 +02:00
rstoyanchev d86bf8b205 Align RouterFunctions resource handling
Closes: gh-33434
2024-09-12 08:33:37 +01:00
Sam Brannen c77de8a6fb Downgrade to Tomcat 10.1.28
Tomcat 10.1.29 was causing failures in spring-webflux when running a
full build.
2024-09-11 18:08:01 +02:00
Juergen Hoeller 4e49f67ec5 Upgrade to SLF4J 2.0.16, Tomcat 10.1.29, Jetty 12.0.13, Netty 4.1.113, Undertow 2.3.17, AssertJ 3.26.3, Checkstyle 10.18.1 2024-09-11 17:16:14 +02:00
Juergen Hoeller 54dbb9f52a Upgrade to Objenesis 3.4
Closes gh-33526
2024-09-11 17:15:37 +02:00
Stéphane Nicoll 34f649c3f5 Upgrade to Reactor 2023.0.10
Closes gh-33519
2024-09-10 15:05:08 +02:00
Stéphane Nicoll 5b01f31387 Upgrade to Micrometer 1.12.10
Closes gh-33518
2024-09-10 15:04:42 +02:00
Sébastien Deleuze 9150c81d92 Document fixed rate scheduling with CRaC
Closes gh-33490
2024-09-09 18:43:55 +02:00
Sam Brannen 4e1756d738 Polishing 2024-09-09 15:34:00 +02:00
rstoyanchev 5c1ab7ecd5 Polishing contribution
Closes gh-33498
2024-09-09 11:55:15 +01:00
yfoelsin 7655329463 Set status code on DefaultRenderingBuilder for RedirectView
See gh-33498
2024-09-09 11:54:50 +01:00
rstoyanchev 3d1bf28445 Refine how async request state lock is obtained
Rather than waiting indefinitely, keep checking if the state
changed from ASYNC (e.g. to ERROR).

Closes gh-33421
2024-09-09 11:54:38 +01:00
Johnny Lim b7c7823315 Add @⁠since tag for CodeWarnings.detectDeprecation(ResolvableType)
See gh-32850
Closes gh-33493
2024-09-05 17:45:52 +02:00
Sam Brannen caaa86d6cf Make AspectJ pointcut in test more robust
The previous pointcut attempted to match against a local lambda type;
however, that pointcut was unreliable and failed sporadically.

This commit therefore changes the pointcut so that it specifically
targets the get() method of a subtype of Supplier, which seems to result
in reliable pointcut matching.
2024-09-04 17:30:16 +02:00
Sam Brannen 46655f367e Polishing 2024-09-04 17:27:01 +02:00
Sébastien Deleuze 4b7292f431 Fix an off-by-one bug in ForwardedHeaderTransformer
Consistently with what is done in ForwardedHeaderFilter.

Closes gh-33465
2024-09-04 16:12:44 +02:00
Sébastien Deleuze 83be0f2dac Improve documentation on reading form data
`@RequestParam` should be favored over `@RequestBody`
which can't always be used reliably due to how the Servlet
API behaves.

Closes gh-33409
2024-09-03 20:22:00 +02:00
Sébastien Deleuze 3c2831030b Upgrade to Kotlin 1.9.25
Closes gh-33471
2024-09-03 15:34:53 +02:00
Juergen Hoeller 1f6ab1a0c9 Polishing 2024-08-31 12:00:41 +02:00
Juergen Hoeller ce5869eeb0 Consistent test execution with Locale.UK 2024-08-31 12:00:34 +02:00
Juergen Hoeller 1db9faf248 Avoid shutdown timeout in case of exception on stop
Closes gh-33442
2024-08-31 12:00:26 +02:00
Juergen Hoeller 5d80d75051 Follow symlinks during root path traversal
Closes gh-33424
2024-08-31 12:00:14 +02:00
Brian Clozel debba6545b Listen to multiple async operations in ServerHttpObservationFilter
Prior to this commit, the `ServerHttpObservationFilter` was fixed to
re-enable instrumentation for async dispatches. This fix involves using
an AsyncListener to be notified of exchange completion.

This change was incomplete, as this would not work in some cases.
If another filter starts the async mode and initiates an ASYNC dispatch,
before async handling at the controller level, the async listener is not
registered against subsequent async starts.

This commit not only ensures that the async listener registers
against new async starts, but also ensure that the initial creation and
registration only happens during the initial REQUEST dispatch.

Fixes gh-33451
2024-08-30 20:09:21 +02:00
Brian Clozel fab889009a Support multiple async starts in MockHttpServletRequest
Closes gh-33457
2024-08-30 20:08:36 +02:00
Sam Brannen 5927b70dfe Update information in SpEL Evaluation chapter in reference manual
This commit updates the Evaluation chapter to reflect the following.

- SimpleEvaluationContext no longer has a create() method. Instead it
  has forPropertyAccessors(), forReadOnlyDataBinding(), and
  forReadWriteDataBinding() factory methods.

- SpEL cannot automatically create missing array elements or grow the
  size of an array like it can for a collection.

Closes gh-33456
2024-08-30 19:06:35 +02:00
Sam Brannen dca55236c4 Stop documenting use of -debug compiler flag in reference manual
Closes gh-33453
2024-08-30 11:24:39 +02:00
Sam Brannen 61b5b1edd8 Fix example for @⁠ImportResource in the reference manual
Prior to this commit, the main() method attempted to retrieve a
TransferService bean from the context, but no such bean had been
configured in the context.

This commit addresses that by configuring a TransferService bean in the
context.

Closes gh-33446
2024-08-29 16:29:30 +02:00
Sam Brannen 22abcf9aef Update examples to use Environment#matchesProfiles() 2024-08-29 16:25:04 +02:00
Sam Brannen 4fa27197a7 Fix titles for code listings and improve wording 2024-08-29 16:06:52 +02:00
Sam Brannen acf82e7c6d Use discrete headings instead of titled blocks in reference manual
This code switches from titled blocks to discrete headings in order to
properly format pseudo-section headers in the reference manual.

Closes gh-33447
2024-08-29 15:39:10 +02:00
Sam Brannen 29fdcf56eb Polishing 2024-08-29 15:15:26 +02:00
rstoyanchev 186deb777f Update deprecation notices on rawStatusCode
Mark for removal where not marked, and set to 7.0
consistently as the target for removal.

See gh-33440
2024-08-28 18:49:49 +03:00