Commit Graph

5244 Commits

Author SHA1 Message Date
Sébastien Deleuze
7e1d6fe934 Merge branch '6.1.x' 2024-11-05 10:27:22 +01:00
Johnny Lim
0beb56a58c Fix indentation to use tabs in Kotlin source files
Closes gh-33840
2024-11-05 10:24:02 +01:00
Sam Brannen
e3301dd1c4 Merge branch '6.1.x' 2024-11-03 16:17:43 +01:00
Sam Brannen
6bd4687706 Update copyright headers
See gh-33839
2024-11-03 16:14:41 +01:00
Tran Ngoc Nhan
07b12666b4 Fix typos in Javadoc and variable names
Closes gh-33839
2024-11-03 16:13:50 +01:00
rstoyanchev
bc65f93467 Improve cancel in SubscriberInputStreamTests 2024-10-31 10:05:45 +00:00
rstoyanchev
38c88e769d Polishing in SubscriberInputStreamTests 2024-10-31 10:05:45 +00:00
Sébastien Deleuze
09d87fac57 Annotate RestClient retrieve() with @CheckReturnValue
This annotation triggers a warning in IDEs supporting
`@CheckReturnValue` when retrieve() return value is not
used.

Closes gh-33818
2024-10-30 14:45:35 +01:00
Juergen Hoeller
a1f6098158 Merge branch '6.1.x' 2024-10-29 23:04:05 +01:00
Juergen Hoeller
11ebceee38 Call get/setRequestConfig for HttpClient 5.4 compatibility
Includes upgrade to HttpClient 5.4.1 while retaining a HttpClient 5.1 baseline.

Closes gh-33806
2024-10-29 23:01:57 +01:00
rstoyanchev
4749d810db Refactor ReactorClientHttpRequestFactory timeouts
Closes gh-33782
2024-10-28 12:45:53 +00:00
rstoyanchev
044da794f4 Polishing ReactorClientHttpRequestFactory 2024-10-28 12:45:53 +00:00
rstoyanchev
89d56b1fa6 Streaming ReactorClientHttpResponse
Closes gh-33781
2024-10-28 12:45:53 +00:00
rstoyanchev
f1cfe7a3d4 InputStreamSubscriber instantiation and Javadoc
See gh-31677
2024-10-28 12:45:53 +00:00
rstoyanchev
dfaf7a0c6a Rename InputStreamSubscriber to SubscriberInputStream
It is both, but InputStream is what's exposed for public use,
in effect an InputStream backed by a Subscriber source.

See gh-31677
2024-10-28 12:45:53 +00:00
rstoyanchev
86a42db002 InputStreamSubscriber/Tests conform to style
See gh-31677
2024-10-28 12:45:53 +00:00
rstoyanchev
d4b31fd4b2 InputStreamSubscriber compiler issues
See gh-31677
2024-10-28 12:45:53 +00:00
rstoyanchev
a366ea0e15 Align InputStreamSubscriber copies
There are legitimate differences, but also some are fixes that
should be on both sides.

See gh-31677
2024-10-28 12:45:53 +00:00
OlegDokuka
37622a7f90 Support Publisher to InputStream conversion
See gh-31677
2024-10-28 12:45:53 +00:00
Sam Brannen
5532574f56 Remove unused casts and variables 2024-10-25 15:16:05 +02:00
Brian Clozel
9df4fcdc9e Merge branch '6.1.x' 2024-10-25 10:55:00 +02:00
Brian Clozel
a06bbccf9e HttpHeaders.writeableHttpHeaders should unwrap many times
Prior to this commit, the `HttpHeaders.writeableHttpHeaders` would only
consider headers read-only instances that were wrapped once by
`HttpHeaders.readOnlyHttpHeaders`. This does not work when other
`HttpHeaders` wrappers are involved in the chain.

This commit ensures that `writeableHttpHeaders` unwraps all headers
instances down to the actual multivalue map and create a new headers
instance out of it.

Fixes gh-33789
2024-10-25 10:22:12 +02:00
rstoyanchev
bbe362c0e6 Allow null from RestClient exchange methods
Closes gh-33779
2024-10-23 19:08:54 +01:00
rstoyanchev
bff76d756b Refactor implementation of retrieve in RestClient
Closes gh-33777
2024-10-23 18:59:07 +01:00
rstoyanchev
d05f880d74 Fix test causing failure in RestClientObservationTests
See gh-33697
2024-10-23 12:24:28 +01:00
rstoyanchev
2b113e3fd0 Minor refactoring
Closes gh-33697
2024-10-23 11:38:19 +01:00
rstoyanchev
73e5aa38ec Polishing contribution
See gh-33697
2024-10-23 11:38:19 +01:00
Nicklas Wiegandt
a0af708c03 Add cookie support to RestClient
See gh-33697
2024-10-23 11:38:18 +01:00
Brian Clozel
d8c153a9d1 Remove support for Resin Servlet container
This commit removes all references to the Resin Servlet container, as it
is not supported as of Spring Framework 6.0 because we require a
JakartaEE baseline.

Closes gh-33772
2024-10-23 10:10:29 +02:00
Brian Clozel
1ba773170d Merge branch '6.1.x' 2024-10-23 09:26:40 +02:00
Brian Clozel
4a81f2c904 Remove HTTP parts workaround for Resin
A workaround was added for the Resin Servlet container in gh-13937.
This avoids attempting to delete parts that are not named, because the
`part.delete()` call would fail for non-file entries. This can be
problematic for files that are unnamed as they might not be removed by
the Framework.

This commit removes this workaround as Resin is not supported anymore.

Fixes gh-33511
2024-10-23 09:24:30 +02:00
rstoyanchev
b7fc4bc5c8 Polishing contribution
Closes gh-33716
2024-10-22 17:37:45 +01:00
Ilya Serkov
657e002ed7 Fix HttpHeaders.setHost() to remove the header
See gh-33716
2024-10-22 17:37:44 +01:00
Brian Clozel
5f14703105 Merge branch '6.1.x' 2024-10-18 14:43:54 +02:00
Brian Clozel
67d78eb61c Avoid Servlet observations failures for invalid HTTP status
Prior to this commit, the `DefaultServerRequestObservationConvention`
for Servlet failed when the HTTP response status was invalid (for
example, set to "0").

This commit catches `IllegalArgumentException` thrown for such invalid
HTTP status and instead returns an unknown outcome for the observation.

Fixes gh-33725
2024-10-18 14:43:46 +02:00
Sébastien Deleuze
e02f8ca492 Merge branch '6.1.x' 2024-10-18 12:37:00 +02:00
Johnny Lim
73fd9133e9 Fix Javadoc in ReactorNetty2ResourceFactory
See gh-33338
Closes gh-33735
2024-10-18 12:36:15 +02:00
Brian Clozel
cee8b52de8 Merge branch '6.1.x' 2024-10-18 10:55:21 +02:00
Brian Clozel
912c067e23 Fix buffer leak in Jackson2 decoders
Prior to this commit, the Jackson2 decoders (JSON, Smile, CBOR) could
leak buffers in case the decoding operation times out or is cancelled
and some buffers are still in flight.

This commit ensures that buffers are released on cancel signals.

Fixes gh-33731
2024-10-18 10:51:38 +02:00
Johnny Lim
cbdfe815aa Add Javadoc since for headers() in Delete/Patch/Post/PutExchange
See gh-33309
Closes gh-33723
2024-10-16 18:11:29 +02:00
rstoyanchev
ca820c914f Polishing contribution
Closes gh-33715
2024-10-16 13:06:22 +01:00
Yanming Zhou
f35ed8d044 Improve check whether to lowercase scheme
See gh-33715

```
Map has no value for 'thescheme'
java.lang.IllegalArgumentException: Map has no value for 'thescheme'
	at org.springframework.web.util.UriComponents$MapTemplateVariables.getValue(UriComponents.java:348)
	at org.springframework.web.util.UriComponents.expandUriComponent(UriComponents.java:263)
	at org.springframework.web.util.HierarchicalUriComponents.expandInternal(HierarchicalUriComponents.java:436)
	at org.springframework.web.util.HierarchicalUriComponents.expandInternal(HierarchicalUriComponents.java:53)
	at org.springframework.web.util.UriComponents.expand(UriComponents.java:161)
	at org.springframework.web.util.UriComponentsBuilder.buildAndExpand(UriComponentsBuilder.java:364)
```
2024-10-16 12:54:33 +01:00
rstoyanchev
bdcfbee7df Merge branch '6.1.x' 2024-10-16 12:11:23 +01:00
rstoyanchev
23656aebc6 Use Locale.ROOT consistently for toLower/toUpperCase
See gh-33708
2024-10-16 12:05:54 +01:00
Juergen Hoeller
fb6a6892ef Merge branch '6.1.x' 2024-10-16 11:36:30 +02:00
Juergen Hoeller
feb6a5f52d Polishing 2024-10-16 11:35:23 +02:00
rstoyanchev
c261ca3102 Ensure scheme not lowercased if URI variable
Closes gh-33699
2024-10-15 20:50:01 +01:00
Brian Clozel
f204f4962d Document XML parser usage against security false positives
Prior to this commit, our XML parser usage would be already haredened
against XXE (XML External Entities) attacks. Still, we recently received
several invalid security reports claiming that our setup should be
hardened.

This commit documents a few usages of XML parsers to add some more
context and hopefully prevent future invalid reports.

Closes gh-33713
2024-10-15 18:59:02 +02:00
Sébastien Deleuze
60978ff4c7 Polish WebRequest Javadoc
See gh-33698
2024-10-14 17:07:07 +02:00
Tran Ngoc Nhan
e191c34078 Polishing
Closes gh-33681
2024-10-14 16:44:42 +02:00