Commit Graph
6207 Commits
Author SHA1 Message Date
Brian Clozel df72838ce1 Merge commit 'v7.1.0-M1~1' 2026-08-20 18:18:13 +02:00
Brian Clozel 2730d77f82 Polishing contribution
Closes gh-34993
2026-08-20 14:13:55 +02:00
Mario Daniel Ruiz Saavedra 4a64537ac6 Add QUERY HTTP method
Signed-off-by: Mario Daniel Ruiz Saavedra <desiderantes93@gmail.com>
2026-08-20 14:13:55 +02:00
rstoyanchev ee3b666a5c Merge branch '7.0.x' 2026-08-19 14:19:30 +03:00
rstoyanchev 6dcdf19169 Polishing in Protobuf decoders
See gh-37147
2026-08-19 10:55:12 +03:00
rstoyanchev 76239d083b Make getMessageBuilder in Protobuf decoders protected
Closes gh-37147
2026-08-19 10:52:35 +03:00
rstoyanchev 40ea92621d Correct supported media types in ProtobufJsonEncoder
Closes gh-37154
2026-08-19 10:44:15 +03:00
rstoyanchev b0149b842b Polishing in Protobuf encoding support
See gh-37154
2026-08-19 10:44:15 +03:00
Tran Ngoc Nhan b20d31a5cd Update MockCookie#parse(String) validation to align with Javadoc
See gh-37134
Closes gh-37136

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2026-08-18 18:24:38 +02:00
rstoyanchev e12f0761f3 Refactor maxInMemory limit handling for async XML parsing
The limit was previously enforced in XmlEventDecoder, because it is
what parses incoming buffers. However, the actual caching is in
Jaxb2Decoder, which holds on to XML events, but has no good way to
estimate their size.

After this commit XmlEventDecoder no longer enforces memory limits
for async parsing. It releases each buffer immediately anyway.

Instead XmlEventDecoder is only responsible to update the number
of bytes received via a new ReceivedByteTracker type while
Jaxb2XmlDecoder uses the same to perform limit and reset the
count depending on when it is aggregating XML events.

Closes gh-37031
2026-08-14 09:19:58 +02:00
rstoyanchev 30e3a5719e Leading slash handling in UrlHandlerFilter
Closes gh-37030
2026-08-14 09:19:58 +02:00
rstoyanchev 1c77e241e6 Consistent maxPartSize check in PartEventHttpMessageReader
Closes gh-37028
2026-08-14 09:19:58 +02:00
rstoyanchev a69fe71630 Return sameSite cookie value in Jetty response
Closes gh-37025
2026-08-14 09:19:58 +02:00
Sébastien Deleuze 8cb1151375 Ensure consistent EscapedErrors field error escaping
Closes gh-37055
2026-08-14 09:19:58 +02:00
Brian Clozel 5abe6d3e5f Centralize Server Sent Event utility methods
Prior to this commit, many classes would support writing Server Sent
Events in some way to the response output stream. This has lead to some
code duplication.

This commit refactors the duplicated code in a shared `SseUtils` class.

Closes gh-37065
2026-08-14 09:19:58 +02:00
Brian Clozel 999f428987 Ensure parsing/tostring symmetry in ContentDisposition
Prior to this commit, building a "Content-Disposition" header to a
String and then parsing it back would not always result in the original
header.

This commit ensures that ContentDisposition guarantees this and honors
the "equals" contract.

Fixes gh-37064
2026-08-14 09:19:58 +02:00
Sam Brannen e78d3df566 Revert "Update MockCookie#parse(String) validation to align with Javadoc"
This reverts commit 8b894933ae due to
code freeze on main.

See gh-37134
2026-08-13 17:15:34 +02:00
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