Commit Graph

1151 Commits

Author SHA1 Message Date
Sébastien Deleuze
e9c4665a80 Merge branch '6.2.x' 2025-04-02 18:05:04 +02:00
Taeik Lim
a946fe2bf8 Fix broken link for Server-Sent Events
Signed-off-by: Taeik Lim <sibera21@gmail.com>
Closes gh-34705
2025-04-02 17:43:42 +02:00
Sam Brannen
8db1340263 Merge branch '6.2.x' 2025-03-19 16:24:18 +01:00
Sam Brannen
208d52d852 Introduce Checkstyle rule for separator symbol location 2025-03-19 15:35:44 +01:00
rstoyanchev
f8a82b46c1 Fix WebSocketHandlerMapping match for "/*"
Closes gh-34503
2025-03-12 12:29:35 +00:00
Sam Brannen
cd4e73a4a3 Fix typos in CloseStatus comments
Closes gh-34548
2025-03-06 10:26:07 +01:00
rstoyanchev
788b66feac Remove UrlPathHelper in ServletWebSocketHandlerRegistry
See gh-34508
2025-02-28 16:20:38 +00:00
rstoyanchev
6a9783bb1a Merge branch '6.2.x' 2025-02-28 14:41:47 +00:00
rstoyanchev
7e9ac120ac Deprecate UrlPathHelper in ServletWebSocketHandlerRegistry
Closes gh-34508
2025-02-28 14:39:29 +00:00
rstoyanchev
b0a1a11612 Merge branch '6.2.x' 2025-02-10 11:15:08 +00:00
rstoyanchev
ceffda7874 Polishing contribution
Closes gh-34362
2025-02-10 11:14:21 +00:00
Jared Wiltshire
49f9b40fba Support RFC 8441 upgrades over HTTP/2 CONNECT
See gh-34362

Signed-off-by: Jared Wiltshire <jazdw@users.noreply.github.com>
2025-02-10 11:14:21 +00:00
rstoyanchev
ecf75f2f40 Merge branch '6.2.x' 2025-02-03 15:31:32 +00:00
rstoyanchev
f477c1653d Allow WebSocket over HTTP CONNECT
Closes gh-34044
2025-02-03 15:28:27 +00:00
Daeho Kwon
7536777a18 Replace hardcoded "Sec-WebSocket-Version" with constant
Closes gh-34319

Signed-off-by: Daeho Kwon <trewq231@naver.com>
2025-02-03 15:06:28 +00:00
Sam Brannen
7a98e210da Remove obsolete code
See gh-34331
2025-01-29 18:06:28 +01:00
rstoyanchev
83cdd58ac8 Update localAddress handling in StandardWebSocketClient
Closes gh-34331
2025-01-28 15:49:58 +00:00
rstoyanchev
52c187bf64 Merge branch '6.2.x' 2025-01-28 15:37:38 +00:00
rstoyanchev
a6b6d19545 Update localAddress Javadoc in WebSocketSession
Closes gh-34304
2025-01-28 15:36:26 +00:00
Mengqi Xu
dc98a7960a Remove the catch of NPE because this issue had resolved at Jetty 12.0.2.
Closes gh-34235
Signed-off-by: Mengqi Xu <2663479778@qq.com>
2025-01-10 18:12:51 +01:00
Brian Clozel
f2a18e5920 Upgrade to Jetty 12.1.0.alpha0
Closes gh-34237
2025-01-10 18:03:10 +01:00
Sébastien Deleuze
ec48c47886 Make URI template variables nullable
Closes gh-34221
2025-01-10 11:39:21 +01:00
Simon Baslé
0c6f5d7d29 HttpHeaders are no longer a MultiValueMap
This change removes the `MultiValueMap` nature of `HttpHeaders`, since
it inherits APIs that do not align well with underlying server
implementations. Notably, methods that allows to iterate over the whole
collection of headers are susceptible to artificially introduced
duplicates when multiple casings are used for a given header, depending
on the underlying implementation.

This change includes a dedicated key set implementation to support
iterator-based removal, and either keeps map method implementations that
are relevant or introduces header-focused methods that have a similar
responsibility (like `hasHeaderValues(String, List)` and
`containsHeaderValue(String, String)`).

In order to nudge users away from using an HttpHeaders as a Map, the
`asSingleValueMap` view is deprecated. In order to offer an escape
hatch to users that do make use of the `MultiValueMap` API, a similar
`asMultiValueMap` view is introduced but is immediately marked as
deprecated.

This change also adds map-like but header-focused assertions to
`HttpHeadersAssert`, since it cannot extend `AbstractMapAssert` anymore.

Closes gh-33913
2024-12-24 14:43:51 +01:00
rstoyanchev
373763723e Deprecate use of PathMatcher and UrlPathHelper in web
Closes gh-34018
2024-12-19 15:59:41 +00:00
Sébastien Deleuze
bc5d771a06 Switch to JSpecify annotations
This commit updates the whole Spring Framework codebase to use JSpecify
annotations instead of Spring null-safety annotations with JSR 305
semantics.

JSpecify provides signficant enhancements such as properly defined
specifications, a canonical dependency with no split-package issue,
better tooling, better Kotlin integration and the capability to specify
generic type, array and varargs element null-safety. Generic type
null-safety is not defined by this commit yet and will be specified
later.

A key difference is that Spring null-safety annotations, following
JSR 305 semantics, apply to fields, parameters and return values,
while JSpecify annotations apply to type usages. That's why this
commit moves nullability annotations closer to the type for fields
and return values.

See gh-28797
2024-12-19 11:07:23 +01:00
Sam Brannen
af83a152dc Polishing 2024-12-15 15:55:03 +01:00
Juergen Hoeller
9fe69e2cc4 Merge branch '6.2.x' 2024-12-11 16:59:31 +01:00
Juergen Hoeller
68997d8416 Avoid javadoc references to deprecated types/methods 2024-12-11 16:58:37 +01:00
Sébastien Deleuze
db196321a6 Merge branch '6.2.x' 2024-12-05 15:44:43 +01:00
Sébastien Deleuze
c807fa597f Remove unnecessary HandshakeHandlerRuntimeHints
Those hints are not needed anymore as of Spring Framework 6.1.

Closes gh-34032
2024-12-05 15:44:09 +01:00
Juergen Hoeller
162e533393 Merge branch '6.2.x'
# Conflicts:
#	spring-context/src/test/java/org/springframework/scheduling/concurrent/AbstractSchedulingTaskExecutorTests.java
#	spring-web/src/main/java/org/springframework/http/MediaType.java
#	spring-websocket/spring-websocket.gradle
#	spring-websocket/src/main/java/org/springframework/web/socket/messaging/WebSocketStompClient.java
#	spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequest.java
2024-12-04 16:45:54 +01:00
Juergen Hoeller
edf7f3cd43 Polishing 2024-12-04 16:41:07 +01:00
Juergen Hoeller
2b9010c2a2 Remove APIs marked as deprecated for removal
Closes gh-33809
2024-12-04 13:19:39 +01:00
Juergen Hoeller
3f3341bb1d Drop server-specific RequestUpgradeStrategy implementations
StandardWebSocketUpgradeStrategy is the common replacement on Tomcat, Undertow and all EE servers. JettyRequestUpgradeStrategy remains the preferred choice on Jetty.

Closes gh-33744
2024-12-03 19:08:22 +01:00
Sam Brannen
d92c57f7a5 Merge branch '6.1.x' 2024-11-13 14:23:52 +01:00
Sam Brannen
4d792d0e45 Remove mentions of Joda-Time support
Since Joda-Time support was removed in Spring Framework 6.0, this commit
removes obsolete mentions of Joda-Time in the reference guide and Javadoc.

See gh-27426
Closes gh-33881
2024-11-13 14:16:14 +01:00
Sam Brannen
f427ac383d (Re)suppress deprecation warnings
See gh-33780
2024-10-30 10:52:01 +01:00
Juergen Hoeller
9e3371ef07 Mark ListenableFuture as deprecated for removal
Closes gh-33808
2024-10-29 18:36:40 +01:00
rstoyanchev
92c9b0dc97 Reduce logging for unsent SUBSCRIBE messages
Closes gh-28252
2024-10-16 16:14:10 +01:00
Juergen Hoeller
e89218b39a Merge branch '6.1.x' 2024-10-16 13:46:22 +02:00
Juergen Hoeller
c765d03a59 Use Locale.ROOT consistently for toLower/toUpperCase
Closes gh-33708
2024-10-16 13:44:59 +02: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
Stéphane Nicoll
beca562ac2 Merge branch '6.1.x' 2024-10-04 10:20:28 +02:00
jun
a668580f77 Use HttpMethod.GET for better readability
See gh-33634
2024-10-04 10:10:58 +02:00
Brian Clozel
8cd2c40860 Improve random source in SockJS server support
Prior to this commit, the SockJs server support would use
`java.util.Random` to send a random value to clients when they request
the `/info` endpoint. Per protocol, clients can use this value as a
source of entropy for generating a random session id.

In practice, this is not used by clients. For example, the SockJS
javascript client is using a cryptographically safe API to generate
session ids.

While this has no concrete effect on known clients, this commit improves
the random source in the server support by switching to
`java.security.SecureRandom`.

Closes gh-33632
2024-10-01 21:29:19 +02:00
Yanming Zhou
8941e2876e Replace 'e.g.' with 'for example' in documentation and comments
Closes gh-33515
2024-09-26 14:11:17 +02:00
rstoyanchev
007a347ade Refine executor description in WebSocketMessageBrokerStats
Closes gh-33104
2024-07-12 17:35:35 +01: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
Sam Brannen
932ce04541 Stop referring to old Spring versions in Javadoc 2024-07-01 17:50:52 +02:00