Commit Graph
6088 Commits
Author SHA1 Message Date
Tran Ngoc Nhan 8b894933ae Update MockCookie#parse(String) validation to align with Javadoc
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2026-08-13 12:38:02 +02:00
Juergen Hoeller 00b9063e7d Polishing 2026-08-11 23:48:56 +02:00
Juergen Hoeller cc751e61a2 Merge branch '7.0.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2026-08-11 23:23:40 +02:00
Juergen Hoeller abd323d428 Polishing 2026-08-11 23:10:15 +02:00
rstoyanchev b6cb9a5f87 Merge branch '7.0.x' 2026-08-07 10:32:13 +03:00
rstoyanchev 11bb7b54e5 Ignore an empty port
Closes gh-37117
2026-08-07 10:31:29 +03:00
rstoyanchev 70ca103b22 Polishing in UriComponentsTests
See gh-37117
2026-08-07 10:25:12 +03:00
Brian Clozel 51c4539bb6 Stop using deprecated HttpMessageConverterExtractor in StatusHandler
Prior to this commit, `HttpMessageConverterExtractor` was deprecated
with `RestTemplate` and related types. `StatusHandler` was still using
it and causing a deprecation warning.

This commit extracts the relevant implementation from
`DefaultRestClient` and promotes it as a shared static method in
`RestClientUtils`.

Fixes gh-37010
2026-08-05 17:54:02 +02:00
jhan0121 4bcae5305d Deprecate setDisallowedFields in DataBinder
Closes gh-36816
Signed-off-by: Juhwan Lee <jhan0121@gmail.com>
2026-07-29 16:17:09 +03:00
rstoyanchev cde75754bc Polishing in HttpClientErrorException
See gh-36807
2026-07-29 15:50:39 +03:00
Dominik Kovács dddd237449 Add HttpClientErrorException.PreconditionFailed
Closes gh-36807

Signed-off-by: Dominik Kovács <dominik.kovacs28@gmail.com>
2026-07-29 15:50:38 +03:00
rstoyanchev 56f7cc2dab Merge branch '7.0.x' 2026-07-29 15:18:45 +03:00
rstoyanchev 719311f09b Correct since tags
See gh-37090
2026-07-29 15:18:22 +03:00
rstoyanchev 1d1aac3674 Merge branch '7.0.x' 2026-07-27 12:58:34 +03:00
rstoyanchev 181a5d3403 Allow choice between Forwarded and X-Forwarded headers
This commit introduces a constructor argument to select whether
to use the standard "Forwarded" header or the "X-Forwarded-*"
alternative headers. A separate property to control support for
X-Forwarded-Prefix.

Closes gh-37090
2026-07-27 12:46:43 +03:00
Brian Clozel 079992021c Improve MimeType parser for RFC compliance
Prior to this commit, the `MimeType` class would compare raw parameter
values for the equals/hashcode contract. This went against the RFC which
states that quoted and unquoted parameter values are equivalent.

This commit rewrote the entire `MimeType` parser in `MimeTypeUtils`
as a state parser to improve robustness and performance.
The `MimeType` equals, compareTo and hascode contracts now unquote
parameter values before comparing them.

This change also optimizes the `tokenize` function that splits many
comma-separated MIME types into a list. Now that this method isn't used
anywhere else, it is also deprecated as of 7.1. This method was
initially made public to be reused within Spring Framework and has no
particular use in Spring applications in general.

Finally, this also makes `MediaType` and `MimeType` leverage the
`MimeType` LRU cache as much as possible, including when parsing
`Accept:` HTTP headers.

Closes gh-36729
2026-07-24 14:29:36 +02:00
rstoyanchev 9bdeadcfbd Deprecate historic forwarded header behavior
See gh-37072
2026-07-23 12:15:24 +03:00
rstoyanchev 31c37d4f2c Require choice between Forwarded and X-Forwarded headers
This commit introduces a constructor argument to select whether
to use the standard "Forwarded" header or the "X-Forwarded-*"
alternative headers. A separate property enables support for
X-Forwarded-Prefix.

Closes gh-37072
2026-07-23 12:15:24 +03:00
rstoyanchev 68862530fb Parse the standard "Forwarded" header directly
This commit introduces manual parsing of the standard "Forwarded"
header instead of using regular expressions.

Closes gh-36964
2026-07-23 12:15:24 +03:00
rstoyanchev 7b71df72e5 Add ForwardedInfo to ForwardedHeaderUtils
This commit adds two new methods in ForwardedHeaderUtils, one to parse
the standard "Forwarded" header only, and another to parse the
"X-Forwarded-*" alternative headers. As those are single parse methods,
a ForwardedInfo container type is necessary to return the results.

See gh-36964
2026-07-23 12:15:24 +03:00
Tran Ngoc Nhan 1502ab0b20 Correct HandlerMethodValidationExceptionTests package
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2026-07-21 15:54:53 +03:00
Sam Brannen 304f8eb27e Merge branch '7.0.x' 2026-07-21 12:00:08 +03:00
Sam Brannen b90624472e Polish Javadoc for ProtobufDecoder 2026-07-21 11:57:20 +03:00
BAE JAE HYEON 1600e2479b Fix Javadoc in ProtobufDecoder's MessageSizeReader API
Previously, the @⁠return tag in MessageSizeReader.readMessageSize() was
followed by a redundant "return", which rendered as "Returns: return
the message size..." in the published API documentation.

Closes gh-37079

Signed-off-by: BAE JAE HYEON <roblery128@gmail.com>
2026-07-21 11:53:24 +03:00
Sébastien Deleuze 08a4844288 Upgrade Kotlin to 2.4.10
Closes gh-37074
2026-07-20 15:30:58 +02:00
Brian Clozel 8fb2f72282 Use ASCII chars in Content-Disposition filename parameter
Prior to this commit, gh-36328 avoided using RFC 2047 encoding for the
"filename" parameter and use ISO-8859-1 only. This change unfortunately
caused issues because some implementations might try and detect the
encoding automatically.

This commit restricts the filename parameter to ASCII encoding only by:
* transliterating characters to the closes ASCII character
("é"->"e", "ä"->"ae"...)
* falling back to "_" for other chacacters with non latin alphabet or
  emojis

Closes gh-37062
2026-07-16 19:21:16 +02:00
Brian Clozel 0791d9a6e3 Merge branch '7.0.x' 2026-07-16 19:10:36 +02:00
samlightfoot a2feb9ffe6 Release Jackson BufferRecycler to its pool in encoders
Both encoders acquire a pooled BufferRecycler via
factory._getBufferRecycler() but never return it. Jackson 3 changed the
default pool from a ThreadLocal to a per-factory ConcurrentDequePool that
only refills on an explicit releaseToPool(), so the gap leaves the pool
empty and every encode allocates a fresh recycler and buffers.

Hold the recycler in a local and release it once the generator and byte
builder are done: in encodeValue's finally, and in the streaming path's
doAfterTerminate after generator.close() and byteBuilder.release().
releaseToPool() is idempotent, so sharing the recycler with the generator
cannot double-release.

Closes gh-37059

Signed-off-by: samlightfoot <samueldlightfoot@gmail.com>
2026-07-16 19:00:14 +02:00
Sébastien Deleuze 28bf619887 Merge branch '7.0.x' 2026-07-08 17:23:42 +02:00
Sébastien Deleuze 7e0818f4e9 Align domainToAscii with current WhatWG spec
The WhatWG URL Standard changed its "domain to ASCII" algorithm when
beStrict is false and the domain is an ASCII string, it now returns
the domain lowercased regardless of Unicode ToASCII's outcome, for web
compatibility. Invalid or ambiguous "xn--" (ACE) labels are no longer
rejected or validated; they are lowercased and accepted, matching
browsers and the web-platform-tests URL cases.

This supersedes the earlier spec revision that only lowercased ASCII
domains whose labels did not start with "xn--". Drop the now-obsolete
"xn--" label detection (which was dead code anyway due to a typo) and
unconditionally lowercase ASCII domains.

Closes gh-37018
2026-07-08 15:11:42 +02:00
Sam Brannen 1700fad16d Update due to deprecation warnings 2026-07-06 15:01:43 +02:00
Sam Brannen d71643c347 Remove unused code 2026-07-06 14:55:47 +02:00
Sébastien Deleuze df0ec74107 Merge branch '7.0.x' 2026-07-01 15:41:32 +02:00
Manu Sridharan 99b3e205d1 Update to NullAway 0.13.6
Add missing nullness annotation in
UriComponents.VarArgsTemplateVariables to fix new warnings.

Closes gh-36850

Signed-off-by: Manu Sridharan <msridhar@gmail.com>
2026-07-01 15:39:30 +02:00
Sam Brannen bb34bf6dc6 Merge branch '7.0.x' 2026-06-27 18:09:31 +02:00
Sam Brannen 78f05d8f8e Address deprecation warnings
This commit addresses warnings across the code base related to:

- internal and public deprecations in Spring Framework
- deprecated Locale constructors
- deprecated URL constructors
- deprecated Thread#getId method
2026-06-27 18:08:53 +02:00
Juergen Hoeller bd405756ab Avoid "NullAway.Init" suppression in favor of explicit field handling
Closes gh-36961
2026-06-23 11:55:58 +02:00
Juergen Hoeller 0dc2d03093 Merge branch '7.0.x'
# Conflicts:
#	spring-context/src/main/java/org/springframework/validation/DataBinder.java
2026-06-22 21:55:43 +02:00
Juergen Hoeller d0331a049a Refine various javadoc notes 2026-06-22 21:52:57 +02:00
Juergen Hoeller 7de9c8d58a Consistently handle input format mismatch 2026-06-22 21:52:18 +02:00
rstoyanchev 8a2e4a9e0a Merge branch '7.0.x' 2026-06-22 14:08:46 +01:00
rstoyanchev 41b8f13e91 Fix checkStyleNoHttp errors
See gh-36893
2026-06-22 14:08:25 +01:00
rstoyanchev 0fbe714bd1 Merge branch '7.0.x' 2026-06-22 13:50:10 +01:00
rstoyanchev 167afd91be Fix delegation in LifecyclePrintWriter
Closes gh-36885
2026-06-22 13:12:50 +01:00
rstoyanchev 34a307d4a6 Improve requestUri handling in ReactorUriHelper
Closes gh-36893
2026-06-22 11:12:13 +01:00
rstoyanchev 0e4842062b Polishing in ReactorUriHelper
See gh-36893
2026-06-22 11:06:43 +01:00
rstoyanchev 5059bbd58e Improve parameter-based content negotiation
Closes gh-36925
2026-06-22 10:42:51 +01:00
rstoyanchev cc0ca1b6a5 Polishing in MappingContentNegotiationStrategy hierarchy and tests
See gh-36925
2026-06-22 10:42:51 +01:00
rstoyanchev 8e6b6c5ac3 Refine error handling in MultipartParser
Closes gh-36947
2026-06-17 15:54:48 +01:00
rstoyanchev 2bc0ee7ec1 Polishing in PartGenerator 2026-06-17 13:05:10 +01:00