Commit Graph

4374 Commits

Author SHA1 Message Date
rstoyanchev
cef1b7ea6d Polishing in HTTP interface argument resolvers 2024-08-12 21:01:03 +03:00
Olga Maciaszek-Sharma
51de84e148 Reject null for non-optional arguments
Closes gh-33339
2024-08-12 21:01:03 +03:00
Stéphane Nicoll
4ac4c1b868 Revert "Merge pull request #33366 from kashike"
This reverts commit a1ec7669f6, reversing
changes made to e27192e8ad.

See gh-33366
2024-08-12 17:47:35 +02:00
Stéphane Nicoll
b7ddf1b4f4 Fix typo 2024-08-12 12:18:44 +02:00
Stéphane Nicoll
9f22e0c2de Polish "Make CacheControl immutable"
See gh-33366
2024-08-12 11:44:17 +02:00
Riley Park
c3ab9bba11 Make CacheControl immutable
See gh-33366
2024-08-12 11:28:47 +02:00
Simon Baslé
bf5e218b35 Add support for headers in @HttpExchange
On the client side, supports `name=value` pairs. Placeholders in values
are resolved by the `embeddedValueResolver`.
On the server side, additionally supports `name` and `!name` syntax.

Closes gh-33309
2024-08-09 18:02:16 +02:00
rstoyanchev
b61eee7fb0 Support cross-parameter validation
Closes gh-33271
2024-08-09 18:53:30 +03:00
Simon Baslé
d3e1e35d76 Merge branch '6.1.x' 2024-08-08 15:59:28 +02:00
Simon Baslé
a0edf129eb Fix misleading statement in ReactorResourceFactory javadoc
Closes gh-33338
2024-08-08 15:26:10 +02:00
Stéphane Nicoll
dbb3a9ab08 Merge branch '6.1.x' 2024-08-08 09:33:40 +02:00
Jonatan Ivanov
6c74fee5e8 Remove unnecessary error signal from DefaultRestClient
Before UnknownContentTypeException is thrown, it is added to the current
Observation but since UnknownContentTypeException is a
RestClientException, the exception is added again in one of the
catch blocks later on.

Closes gh-33347
2024-08-08 09:30:22 +02:00
Stéphane Nicoll
873c9fe0d8 Merge branch '6.1.x' 2024-08-08 09:14:30 +02:00
Jonatan Ivanov
36e84a5209 Fix RestClient instrumentation
ClientHttpResponse implements Closeable and the close method of
DefaultConvertibleClientHttpResponse also stops the current Observation.

Before this change exiting the try-with-resource block stopped the
Observation since it called close on ClientHttpResponse.
After this, there were multiple error and stop calls on the Observation
in the catch blocks after the Observation was already stopped
which is invalid.

This change reorders the flow by stopping the Observation in the
finally block (closing ClientHttpResponse) and not stopping
the Observation in any of the catch blocks.

Closes gh-33346
2024-08-08 09:11:57 +02:00
Stéphane Nicoll
25b57d4808 Merge branch '6.1.x' 2024-08-07 16:32:20 +02:00
Stéphane Nicoll
76b2d13b2c Add support for changing context path in ServletRequestPath
This commit implements modifyContextPath in ServletRequestPath and
apply the same logic of concatenating the servlet path with the
context path.

Closes gh-33251
2024-08-07 16:28:17 +02:00
zinzo
edbaf68707 Polishing Javadoc and comment
See gh-33316
2024-08-05 10:05:00 +02:00
Simon Baslé
25f62c8765 Merge branch '6.1.x' 2024-08-01 16:29:52 +02:00
Simon Baslé
722dcae1b1 Fix buffer leak in MultipartParser
This change fixes a buffer leak when the MultipartParser is encountering
a body DataBuffer that only contains a boundary.

Closes gh-33094
2024-08-01 16:28:50 +02:00
Stéphane Nicoll
c71f98acba Merge branch '6.1.x' 2024-07-30 17:21:28 +02:00
Stéphane Nicoll
321e8a58ae Document that NoOpResponseErrorHandler is not a good fit with RestClient
Closes gh-33276
2024-07-30 17:17:39 +02:00
rstoyanchev
f967f6f9f0 Update contribution
Closes gh-33220
2024-07-30 13:15:21 +03:00
Seokjae Lee
5e9308e0cb Flexible collection handling in RequestParamArgumentResolver
See gh-33220
2024-07-30 11:42:44 +03:00
Brian Clozel
b888f362e5 Document ControllerAdviceBean as internal usage
This commit documents `ControllerAdviceBean` as internal usage, as it is
not meant for application to manually create controller advice bean
instances.

This also refactors the existing partial implementation of the support
for creating controller advice beans "programmatically".

Closes gh-32776
2024-07-26 17:52:20 +02:00
Stéphane Nicoll
eda21c4d22 Merge branch '6.1.x' 2024-07-23 10:51:56 +02:00
Stéphane Nicoll
6e9a19212f Consistently check for Content-Length value
This commit makes sure to consistently check that the content length
is not set above 2GB. Previously it was only checked in
setContentLength.

Closes gh-33256
2024-07-23 10:43:48 +02:00
Brian Clozel
ccc0a54c1c Merge branch '6.1.x' 2024-07-23 09:22:15 +02:00
Dawid Olbiński
83ff8e4e98 Support JAXBElement subtypes in Jaxb2XmlEncoder
Closes gh-33258
2024-07-23 09:19:11 +02:00
rstoyanchev
dcabddddc2 Expose HttpExchange metadata to argument resolvers
See gh-33220
2024-07-19 11:00:43 +01:00
Stéphane Nicoll
f4b2886775 Polish "Support JAXBElement in Jaxb2RootElementHttpMessageConverter"
See gh-33233
2024-07-19 10:20:06 +02:00
Thomas Deblock
a5e2557738 Support JAXBElement in Jaxb2RootElementHttpMessageConverter
See gh-33233
2024-07-19 10:12:53 +02:00
rstoyanchev
ade8128060 Remove deprecated methods
Closes gh-33123
2024-07-18 11:37:20 +01:00
rstoyanchev
9409543dac Update deprecation notices
See gh-33123
2024-07-18 11:37:20 +01:00
rstoyanchev
b9509d3c85 Initialize RequestPath on demand
Closes gh-33227
2024-07-17 15:15:31 +01:00
rstoyanchev
b2decb4e5d Merge branch '6.1.x' 2024-07-15 15:21:39 +01:00
rstoyanchev
77bdbf7e37 Polishing contribution
Closes gh-33181
2024-07-15 15:21:19 +01:00
kevin.kep
2fe7ab1f92 Trim last allowed origin in comma-delimited list
See gh-33181
2024-07-15 15:17:03 +01:00
rstoyanchev
39c040005e Lazy use of Reactor Scheduler in DefaultPartHttpMessageReader
Closes gh-33218
2024-07-15 15:10:30 +01:00
Simon Baslé
fbe781b172 Merge branch '6.1.x' 2024-07-12 12:52:40 +02:00
Simon Baslé
152914a752 Fix multipart async servlet request temporary files deletion
This change tracks the multipart nature of the async request
within the `DispatcherServlet`, in the `WebAsyncManager`.

This allows for the second ASYNC dispatch to recognize the
multipart aspect and clean up the associated resources.

Closes gh-33161
2024-07-12 12:50:59 +02:00
Stéphane Nicoll
348764620d Merge branch '6.1.x' 2024-07-12 12:02:45 +02:00
Stéphane Nicoll
0f3f979d16 Align classloader used to create the JAXBContext
This commit makes sure that JAXBContext.newInstance consistently use
the target class classloader to detect the necessary resources.

Previously, the current thread's context classloader was used, which
could lead to not finding the required JAXB components.

Closes gh-33158
2024-07-12 12:00:07 +02:00
Sébastien Deleuze
7617a01f60 Unwrap Kotlin inline value classes return values
The result returned by Kotlin reflective invocation of a function
returning an inline value class is wrapped, which makes sense
from Kotlin POV but from a JVM perspective the associated value
and type should be unwrapped to be consistent with what
would happen with a reflective invocation done by Java.

This commit unwraps such result.

Closes gh-33026
2024-07-10 18:38:37 +02:00
Sébastien Deleuze
e2ce811407 Merge branch '6.1.x' 2024-07-09 12:06:29 +02:00
Sébastien Deleuze
4f38079042 Throw proper DecodingException in Kotlin Serialization decoders
Closes gh-33138
2024-07-09 12:05:24 +02:00
gregw
0a60c622cc Implement Eclipse Jetty core HTTP handler adapter
This provides an implementation of an HTTP Handler Adapter that is coded
directly to the Eclipse Jetty core API, bypassing any servlet
implementation.

This includes a Jetty implementation of the spring `WebSocketClient`
interface, `JettyWebSocketClient`, using an explicit dependency to the
jetty-websocket-api.

Closes gh-32097

Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Arjen Poutsma <arjen.poutsma@broadcom.com>
2024-07-08 18:36:46 +02:00
Stéphane Nicoll
d89cb34c29 Merge branch '6.1.x' 2024-07-08 13:16:29 +02:00
Stéphane Nicoll
69850cad27 Polish "Implement DefaultErrorResponseBuilder#headers(Consumer)"
See gh-33156
2024-07-08 13:11:31 +02:00
Harry Yang
bbbc95f773 Implement DefaultErrorResponseBuilder#headers(Consumer)
See gh-33156
2024-07-08 13:09:26 +02:00
rstoyanchev
194b4cedfb Use parsed path for checks in UrlHandlerFilter
See gh-32830
2024-07-05 09:35:57 +01:00