Commit Graph

621 Commits

Author SHA1 Message Date
Juergen Hoeller
caed04473e Consistent HttpMethod identity comparisons
(cherry picked from commit 0de36d2)
2018-02-18 22:28:37 +01:00
Juergen Hoeller
6d11b40353 Consistent use of StringUtils.toStringArray 2018-02-16 19:48:43 +01:00
Juergen Hoeller
722cb36e01 Consistent Class array vs vararg declarations (and related polishing)
(cherry picked from commit 3b810f3)
2018-02-14 16:38:28 +01:00
Juergen Hoeller
4be416e2ca SubProtocolWebSocketHandler closes sessions outside of lifecycle monitor
Issue: SPR-16488

(cherry picked from commit 3c631f8)
2018-02-13 14:17:52 +01:00
Juergen Hoeller
afe461609c Polishing (selective backports from master) 2018-02-12 13:45:53 +01:00
Juergen Hoeller
33d655a634 Consistent handling of InterruptedException (plus setSchedulerFactory)
Issue: SPR-16479
Issue: SPR-16439

(cherry picked from commit 39201ad)
2018-02-12 13:44:54 +01:00
Juergen Hoeller
05dec6d23e Consistent use of @throws instead of @exception
(cherry picked from commit 5c813a3)
2018-02-12 13:44:17 +01:00
Juergen Hoeller
a041769799 AbstractClientSockJsSession.close propagates IOException from disconnect
Issue: SPR-16415

(cherry picked from commit cf100d4)
2018-02-12 13:39:30 +01:00
Juergen Hoeller
09cb7f4c31 Fine-tuned logging of WebSocket close exceptions
Issue: SPR-16409

(cherry picked from commit 8e2be91)
2018-02-12 13:39:23 +01:00
Juergen Hoeller
04f954956c ServletServerHttpRequest.getURI() ignores malformed query string
The resolved URI instance is also being cached now. This should not make a difference in a real Servlet environment but does affect tests which assumed they could modify an HttpServletRequest path behind a pre-created ServletServerHttpRequest instance. Our WebSocket test base class has been revised accordingly, re-creating the ServletServerHttpRequest in such a case.

Issue: SPR-16414

(cherry picked from commit 0e6f8df)
2018-02-12 13:39:11 +01:00
sdeleuze
e935018b0c Fix SockJs CorsConfiguration for forbidden origins
After this commit, AbstractSockJsService uses the configured allowed
origins when generating the CorsConfiguration instead of "*".

As a consequence, forbidden origin requests still result in a 403
response but now with no CORS headers in order to improve consistency
between the status code and the headers.

Issue: SPR-16304
2018-01-15 18:17:08 +01:00
Juergen Hoeller
640c8ff693 Polishing 2017-11-14 12:31:01 +01:00
Juergen Hoeller
f861f182fa Reduce access on headers for STOMP messaging
Issue: SPR-16165
2017-11-14 12:30:24 +01:00
Juergen Hoeller
268ccb6b6b SubProtocolWebSocketHandler provides protected decorateSession method
Issue: SPR-16089
2017-10-23 19:03:24 +02:00
Juergen Hoeller
5f167fd7f8 Polishing 2017-09-27 01:46:16 +02:00
Juergen Hoeller
9fdc4404a5 Backport selected refinements from the nullability efforts
Issue: SPR-15656
2017-09-27 00:10:04 +02:00
Juergen Hoeller
18a3322d2f Lenient tolerance of unknown HTTP status codes behind RestTemplate
Issue: SPR-15978
2017-09-27 00:09:42 +02:00
Rossen Stoyanchev
5f07434360 Improve check for "Broken pipe" error message
Issue: SPR-15802
2017-07-25 10:34:30 +02:00
Juergen Hoeller
c752ba5b38 Polishing 2017-07-19 23:55:47 +02:00
Rossen Stoyanchev
99236759ec ExceptoinWebSocketHandlerDecorator uses ERROR level
Issue: SPR-15537
2017-05-24 15:01:36 -04:00
Juergen Hoeller
2d1b551248 Common root cause introspection algorithm in NestedExceptionUtils
Issue: SPR-15510
(cherry picked from commit 9d8e9cf)
2017-05-04 14:05:03 +02:00
Rossen Stoyanchev
d3324c8d4f Trap exception from SockJS HeartbeatTask
Issue: SPR-15307
2017-03-16 18:02:44 -04:00
Juergen Hoeller
98dbc17591 Polishing 2017-03-07 10:33:48 +01:00
Juergen Hoeller
28849e0987 Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
(cherry picked from commit 1b2dc36)
2017-01-31 10:28:46 +01:00
Juergen Hoeller
fcfacd9f83 Polishing
(cherry picked from commit f095aa2)
2017-01-23 23:47:01 +01:00
Juergen Hoeller
bddcc669b3 WebSocketSession.getExtensions consistently exposes unmodifiable/empty list
Issue: SPR-15180
(cherry picked from commit e94fa3f)
2017-01-23 23:33:04 +01:00
Rossen Stoyanchev
75daf781c2 Well-known names for beans in message broker XML config
Issue: SPR-15068
2017-01-17 17:08:45 -05:00
Juergen Hoeller
709d4ba6e7 Avoid explicit DecoratedObjectFactory setup in JettyRequestUpgradeStrategy
Issue: SPR-14940
2016-12-21 09:47:29 +01:00
Juergen Hoeller
9cb4de8b5e Polishing 2016-12-20 21:11:07 +01:00
Juergen Hoeller
54c7a9ee95 Revised Jetty 9.3 vs 9.4 differentiation
Issue: SPR-14940
(cherry picked from commit 52799c0)
2016-12-19 00:58:53 +01:00
Rossen Stoyanchev
e16d753439 Allow athentication at the STOMP level
This commit makes it possible for a ChannelInterceptor to override the
user header in a Spring Message that contains a STOMP CONNECT frame.

After the message is sent, the updated user header is observed and
saved to be associated with session thereafter.

Issue: SPR-14690
2016-12-13 16:17:05 -05:00
Brian Clozel
35b0c8b577 Update websocket support for Jetty 9.3+
Due to a few changes in `WebSocketServerFactory` and `Session` API, our
`JettyRequestUpgradeStrategy` and `JettyWebSocketSession` needed to
adapt. As of 9.3.15+ and 9.4.0+, some reflection is required to support
previous versions.

Spring 4.3 websocket officially supports Jetty 9.1 to 9.3.

Issue: SPR-14940
2016-12-09 14:58:18 +01:00
Brian Clozel
75034c3710 Revert "Update websocket support for Jetty 9.3+"
This reverts commit 305cea28c5.
2016-12-08 22:48:06 +01:00
Brian Clozel
305cea28c5 Update websocket support for Jetty 9.3+
Due to a few changes in `WebSocketServerFactory` and `Session` API, our
`JettyRequestUpgradeStrategy` and `JettyWebSocketSession` needed to
adapt. As of 9.3.15+ and 9.4.0+, some reflection is required to support
previous versions.

Spring 4.3 officially supports Jetty 9.1 to 9.3.

Issue: SPR-14940
2016-12-08 21:44:31 +01:00
Rossen Stoyanchev
69ba85b051 Backport of STOMP message header encoding improvements
Issue: SPR-14901
2016-12-08 11:33:16 -05:00
Juergen Hoeller
5fee5f39ea Polishing 2016-12-01 14:13:23 +01:00
Christoph Dreis
8de100b116 Implement allocation-friendly method to get user count in SimpUserRegistry
SPR-14930
(cherry picked from commit a929e9c)
2016-12-01 14:09:43 +01:00
Juergen Hoeller
ac30bcb0eb WebSocketServerSockJsSession uses dedicated disconnect lock
Issue: SPR-14917
(cherry picked from commit a49809b)
2016-12-01 14:09:34 +01:00
Rossen Stoyanchev
8f19650fd7 Avoid locking in WebSocket session "close" callback
When processing a "close" notification from the server make an effort
to cancel any outstanding heartbeat but avoid going as far as acquiring
the responseLock since the server itself may already hold a lock of its
own leading to a potential deadlock.

The heartbeat task is now also further protected with an isClosed()
check in case the heartbeat does not get cancelled in a concurrent
scenario.

Issue: SPR-14917
2016-11-23 20:58:22 -05:00
Juergen Hoeller
fe0249bf8f Polishing 2016-11-04 13:37:06 +01:00
Juergen Hoeller
7e7504f5ea Polishing 2016-11-03 23:20:33 +01:00
Juergen Hoeller
05547979de Polishing
Issue: SPR-14867
(cherry picked from commit a90e4b2)
2016-11-03 14:54:15 +01:00
Rossen Stoyanchev
8f4ec35697 Check SockJS session type
This commits adds a validation check whether the SockJS session type
matches the transport type and rejects requests for which they
don't match.

Issue: SPR-14867
2016-11-03 09:38:24 +02:00
Juergen Hoeller
1c80d2ac2f Avoid deadlock between SockJS heartbeat and XHR polling
Issue: SPR-14833
(cherry picked from commit 72e1f7e)
2016-10-31 11:47:23 +01:00
Juergen Hoeller
f5cd5387da StompSubProtocolHandler does not insist on SimpMessageHeaderAccessor
Issue: SPR-14791
(cherry picked from commit 66722af)
2016-10-12 17:47:58 +02:00
Juergen Hoeller
f2ac416f66 Consistent final logger fields
(cherry picked from commit cfa0f6c)
2016-10-06 00:15:45 +02:00
Juergen Hoeller
d04567b99c Polishing 2016-09-26 18:19:04 +02:00
Sam Brannen
c26bf871b7 Clean up warnings related to forthcoming removals in Tomcat 9
(cherry picked from commit b521aa8)
2016-09-18 21:04:29 +02:00
Juergen Hoeller
37670924f6 Polishing 2016-08-31 01:53:03 +02:00
Juergen Hoeller
acbb2544bf Polishing
(cherry picked from commit 4ef428d)
2016-08-31 00:45:25 +02:00