Commit Graph

3607 Commits

Author SHA1 Message Date
Lachlan Roberts 0e3cfe8fc2 Issue #5287 - share compression pools and size with max num threads
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-10-14 22:28:26 +11:00
Lachlan Roberts 608a895aab Issue #5287 - make default CompressionPool capacity 1024
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-10-14 22:28:26 +11:00
Lachlan Roberts 5dc0242986 Issue #5287 - Changes from review & fix broken tests from NPE
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-10-14 22:28:26 +11:00
Lachlan Roberts 21576f2312 Issue #5287 - fix usages of new CompressionPool
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-10-14 22:28:26 +11:00
Lachlan Roberts 419eefc2ef move logic from messageComplete into appendFrame with fin==true
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-10-14 10:26:08 +11:00
Simone Bordet 1cd15e8d85
Fixes #5379 - Better handling for wrong SNI. (#5398)
* Fixes #5379 - Better handling for wrong SNI.

Reworked the SNI logic.
Added support for IP addresses in the SAN extension of certificates in the X509 class.
Fixed keystores to have CN=localhost and SAN with ip=127.0.0.1 and ip=[::1].
Fixed tests that were not using the correct Host header.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-10-12 15:48:53 +02:00
Joakim Erdfelt dfa076fdb5
Merge pull request #5403 from eclipse/jetty-10.0.x-5401-move-httptester
Move HttpTester to jetty-http
2020-10-12 06:14:44 -05:00
Lachlan Roberts 94bafba6ac simplify the usage of WebSocketUpgradeFilter
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-10-09 17:31:41 +11:00
Lachlan Roberts 7003b3c42e Issue #5378 - guard against concurrent requests lazily initializing the filter
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-10-08 08:46:51 +11:00
Lachlan Roberts 2a4d672fc1 Issue #5378 - improve testing for WebSocketUpgradeFilter
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-10-08 08:46:51 +11:00
Joakim Erdfelt 857e888e8b
Issue #5401 - Move HttpTester to jetty-http
+ leaving jetty-http-tools alone

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-07 14:50:31 -05:00
Lachlan Roberts 09947681fe allow MessageInputStream to read multiple bytes at a time
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-10-07 19:48:13 +11:00
Lachlan Roberts aa1299912d Issue #5368 - when resuming always call onFillable from newThread.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-10-07 16:32:06 +11:00
Lachlan Roberts 7df0dfa7c2 warn if did not read until EOF once per MessageInputStream 2020-10-07 15:41:51 +11:00
Lachlan Roberts 6c94ef5848 Issue #5368 - warn if MessageInputStream closed without fully consuming
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-10-06 17:43:58 +11:00
Lachlan Roberts 941ffcead7 Issue #5368 - ensure onMessage exits before next frame is read
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-10-01 15:42:50 +10:00
Joakim Erdfelt 85e257fc98 Updating to version 9.4.33-SNAPSHOT 2020-09-30 11:53:09 -05:00
Joakim Erdfelt de97d26f7b Updating to version 9.4.32.v20200930 2020-09-30 11:03:24 -05:00
Joakim Erdfelt ad2446dd6c
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-09-29 11:24:28 -05:00
Joakim Erdfelt 3423375a97
Issue #5357 - Updating to https://eclipse.org/ (#5358)
* Issue #5357 - Updating to https://eclipse.org/

 - Removing redundant <url> refs in pom.xml
 - Correcting bad indenting from merge
 - Correcting mailing list references
 - Correcting bugs.eclipse.org references
 - Correcting text file references
 - Correcting html references
 - Correcting further references
 - Correcting download.eclipse.org reference
 - Adding test for demo-base /proxy/current/
 - Ensuring jetty-client is included in javadoc-proxy.war/WEB-INF/lib

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-29 11:02:32 -05:00
Lachlan Roberts a55ddc2093 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-25 13:28:41 +10:00
Chris Walker 70c8822eef
Updated module descriptions for consistency. Resolves #5313 2020-09-23 13:10:47 -05:00
Lachlan Roberts 5d951e840e fix licence header and checkstyle
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-23 10:34:50 +10:00
Lachlan Roberts 2f3808026f Issue #5170 - add testing to verify if this issue exists in 9.4.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-22 18:23:55 +10:00
Lachlan 76cf6c8bdc
Merge pull request #5266 from eclipse/jetty-10.0.x-WebSocketAutoBahn
Issue #5170 - fix upgrade bug in HttpReceiverOverHTTP
2020-09-16 16:39:54 +10:00
Lachlan Roberts 9be277a810 debug log full stacktraces only in processConnectionError and processHandlerError
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-15 16:50:24 +10:00
Lachlan Roberts 14e6bd196e update javadoc for JDK MethodHandles bug tests, stop stacktrace in DistributionTests
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-14 17:28:57 +10:00
Lachlan Roberts c9cd27ee4d Issue #5170 - fix upgrade bug in HttpReceiverOverHTTP
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-14 15:09:00 +10:00
Lachlan Roberts 48a8e2fca5 Improve test to reliably reproduce issue seen in the AutobahnTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-14 14:44:38 +10:00
Lachlan Roberts dd72e85b6a improvements to websocket-core logging to reduce duplicate stacktraces
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-14 14:07:20 +10:00
Lachlan Roberts 5d1d7c9c26 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-09-10 10:55:34 +10:00
Lachlan Roberts 609f0b2159 Merge branch 'jetty-10.0.x-4824-WSmaxOutgoingFrames' into jetty-10.0.x 2020-09-10 10:51:57 +10:00
Lachlan Roberts b44b62038c reorder methods for maxOutgoingFrames, fix javadoc
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-10 09:50:52 +10:00
Lachlan Roberts b7fb631b2d Merge remote-tracking branch 'origin/jetty-9.4.x-4824-WSmaxOutgoingFrames' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-10 09:48:39 +10:00
Lachlan Roberts 4fd7920143 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-4824-WSmaxOutgoingFrames 2020-09-10 09:46:12 +10:00
Lachlan Roberts 4023944d6d fix ServiceLoader file for ExtensionConfig.Parser
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-07 10:37:04 +10:00
Lachlan Roberts b5810b930d Issue #5824 - improve javadocs for RemoteEndpoint maxOutgoingFrames
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-04 17:43:36 +10:00
Lachlan Roberts 7082e2086a cleanups in Jetty WS API
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-04 17:08:44 +10:00
Lachlan Roberts 8bbea55ed9 remove the extensions package as extensions are now written in websocket-core
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-04 16:44:23 +10:00
Lachlan Roberts 8492697ae0 move Jetty WS API exceptions to separate package
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-04 16:40:16 +10:00
Lachlan Roberts 52c9f8730b Issue #4824 - create test for WebSocket maxOutgoingFrames
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-04 10:45:47 +10:00
Lachlan Roberts f788260abd Issue #4824 - use WritePendingException instead of IOException
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-03 14:58:09 +10:00
Simone Bordet 466ec0c2d5 Disabled tests broken in Java 15 due to a JVM bug.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-09-02 18:52:10 +02:00
Lachlan cdb12b4130
Merge pull request #5213 from eclipse/jetty-10.0.x-5170-HttpUpgradeBuffer
Issue #5170 - fix NPE during websocket upgrade
2020-09-02 18:00:19 +10:00
Lachlan Roberts 43f41ae046 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-09-02 15:48:25 +10:00
Lachlan Roberts 576b1e2323 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-4824-WSmaxOutgoingFrames 2020-09-02 10:07:19 +10:00
Lachlan Roberts 5bdcea2a49 change log warning for fillAndParse errors to debug log
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-02 09:55:18 +10:00
Lachlan Roberts ae62180416 Issue #5170 - ensure bytes after 101 response isn't lost during upgrade
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-31 18:29:28 +10:00
Lachlan Roberts cd1edb33f4 Merge remote-tracking branch 'origin/jetty-9.4.x-5193-better-websocket-event-logging' into jetty-9.4.x-5193-NullMessage
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-31 10:53:26 +10:00
Joakim Erdfelt 46402bc382
Issue #5193 - Updating logging per review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-28 05:46:07 -05:00
Lachlan Roberts 92e5abb1bd add missing licence header in SingleOnMessageTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-27 18:05:56 +10:00
Lachlan Roberts 478bcdc868 Issue #5193 - fix lost message bug when using single onMessage annotation
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-27 17:18:48 +10:00
Lachlan Roberts eebb47cbc5 add test to reproduce issue #5193
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-27 17:14:01 +10:00
Joakim Erdfelt 1690e9d30d
Issue #5193 - Adding more EventDriver logging
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-26 06:56:17 -05:00
Jan Bartel 77779ed6d8
Issue #4996 - Regularlize logging (#5167)
* Issue #4996 Regularize logging

Signed-off-by: Jan Bartel <janb@webtide.com>

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-24 17:15:13 +02:00
Lachlan Roberts 35f3f1886e Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-08-19 09:39:31 +10:00
Lachlan Roberts 37a8e44347 fix WebSocketStatsTest numMessages back to 1000
Remove server getConnections check after client open event
as the server connection may not be open yet.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-19 09:36:56 +10:00
Lachlan Roberts 7d6f692721 disable autoFragment for WebSocketStatsTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-19 09:32:54 +10:00
Lachlan Roberts 931e10458a Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-08-19 08:34:39 +10:00
Lachlan cfd31b2cf5
Merge pull request #5125 from eclipse/jetty-9.4.x-5122-WebSocketStats
Issue #5122 - Improve connection statistics for WebSocket
2020-08-19 08:04:47 +10:00
Lachlan Roberts 1663a6d7af Issue #5125 - Generalise WebSocketConnectionStatistics into IncludeExcludeConnectionStatistics
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-14 15:19:06 +10:00
Lachlan Roberts de1077c375 Fix WebSocketServerExamplesTest to work with surefire update
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-13 22:04:56 +10:00
Lachlan cbd4c38f3d
Issue #5121 - always use isDebugEnabled() check before debug logging in WebSocket (#5123)
* Issue #5121 - always use isDebugEnabled() check before logging in CompressExtension

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #5121 - always use isDebugEnabled() check before debug logging

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #5121 - always use isDebugEnabled() check before debug logging in WebSocket

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-11 11:51:39 +02:00
olivier lamy c198d26e6b Updating to version 10.0.0-SNAPSHOT 2020-08-11 16:47:55 +08:00
olivier lamy 429b091578 Updating to version 10.0.0.beta1 2020-08-11 16:47:54 +08:00
Lachlan Roberts 8a3ff775d5 Issue #5122 - make number of active WS Sessions a managed attribute on SessionTracker
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-06 20:45:06 +10:00
Lachlan Roberts be429f0910 Issue #5122 - add specialized Connection.Listener for WebSocket ConnectionStatistics
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-06 20:38:02 +10:00
Lachlan 1e7ce3ac1e
Merge pull request #5101 from eclipse/jetty-10.0.x-5044-WebSocketUpgradeRequestResponse
Issue #5044 - Refactor of Jetty WebSocket Upgrade Request/Response
2020-08-06 09:11:12 +10:00
Lachlan Roberts fd5c07eceb removed dangling javadoc comment
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-06 08:25:40 +10:00
Lachlan 11db6f9d71
Merge pull request #5115 from eclipse/jetty-10.0.x-5096-lazyUpgradeFilter
Issue #5096 - lazily initialize the WebSocketFilter if only using JettyWebSocketServlet
2020-08-05 09:37:42 +10:00
Simone Bordet c49035570e Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-convert_synchronized_to_autolock'. 2020-08-04 16:32:55 +02:00
Lachlan Roberts dbeac5eb49 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-04 20:37:12 +10:00
Lachlan Roberts 9cde41a75c Issue #5096 - add WebSocketFilter lazily if only using JettyWebSocketServlet
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-03 19:01:41 +10:00
Lachlan Roberts 85c4fc5335 Issue #5108 - use set based on ConcurrentHashMap and remove synchronized blocks
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-03 18:26:14 +10:00
Lachlan Roberts d37501dce0 Issue #5108 - use HashSet for SessionTrackers to improve scalability
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-03 10:40:12 +10:00
Lachlan Roberts ce8cb063ea Issue #5044 - extend Jetty WS API Request/Response interfaces for jetty-websocket-server
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-30 17:34:17 +10:00
Lachlan Roberts 3074aa7fae Issue #5044 - Jetty Server upgrade request/response now implement the API interfaces
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-30 13:28:39 +10:00
Lachlan Roberts 9027e17095 Issue #5044 - rename the ClientUpgradeRequest to CoreClientUpgradeRequest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-30 12:51:42 +10:00
Simone Bordet 089e51f0bc Fixes #5083 - Convert synchronized usages to AutoLock.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-29 15:34:01 +02:00
Lachlan Roberts 414a0f35f9 Issue #5044 - move all setter methods on the UpgradeRequest interface to ClientUpgradeRequest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-29 22:44:42 +10:00
Lachlan Roberts 5ff0ce4142 Issue #5044 - implement is secure on DelegatedJettyClientUpgradeRequest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-29 22:22:14 +10:00
Lachlan Roberts 1be0220988 Issue #4919 - make the SessionTracker the one to implement Graceful shutdown
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-28 17:38:41 +10:00
Lachlan Roberts 9e383f0891 Issue #4919 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-28 16:48:49 +10:00
Simone Bordet 8d69fc41a7 Fixes #5083 - Convert synchronized usages to AutoLock.
* Replaced relevant usages of synchronized with AutoLock.
* Made AutoLock serializable since classes that use it may be stored in the HttpSession.
* Added convenience methods to AutoLock to execute lambdas with the lock held.
* Introduced AutoLock.WithCondition to use a Lock and a Condition together.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-27 23:14:05 +02:00
Lachlan Roberts e13d26ab45 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-4919-WebSocketContainerStop
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-24 13:39:07 +10:00
Joakim Erdfelt fe9deae849 Updating to version 9.4.32-SNAPSHOT 2020-07-23 13:53:47 -05:00
Joakim Erdfelt 450ba27947 Updating to version 9.4.31.v20200723 2020-07-23 12:46:54 -05:00
Lachlan Roberts d5cf429537 fix websocket tests from merge
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-23 12:17:20 +10:00
Lachlan Roberts e77c253267 Issue #5018 - fix merge to jetty-10, WSClient.connect Future should fail upgrade
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-23 11:17:05 +10:00
Lachlan Roberts 5726fa9364 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-23 10:19:53 +10:00
Lachlan d8b775c0fb
Merge pull request #5030 from eclipse/jetty-9.4.x-5018-WebSocketClientConnectFuture
Issue #5018 - cancellation of WebSocketClient.connect Future should fail upgrade
2020-07-23 08:36:12 +10:00
Joakim Erdfelt 25a2326221
Merge pull request #5054 from eclipse/jetty-10.0.x-5043-AnonymousWebSocketListener
Issue #5043 - allow anonymous WebSocketListener / Endpoint classes to be used
2020-07-22 14:49:48 -05:00
Lachlan Roberts 695d239ac5 Issue #4919 - all websocket containers to implement Graceful shutdown interface
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-23 00:09:43 +10:00
gregw 965e73e9e9 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-07-20 12:01:53 +02:00
Lachlan Roberts 9f7f2e3e56 WebSocket server now only closes gracefully if the Server stopTimeout is set
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-20 15:49:15 +10:00
Lachlan Roberts 0818f54be8 cleanup the ws javax EchoSocket test class
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-20 15:32:46 +10:00
gregw 6125a07a63 Issue #5053
removed weak random from Masker.
2020-07-17 17:59:57 +02:00
gregw f6d39849e8 Improves #5053 by giving option of secure or pseudo random
Allow random to be passed in and can default to a weak pseudo random.
2020-07-17 12:19:22 +02:00
Lachlan Roberts c94e82470d Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-4919-WebSocketContainerStop 2020-07-17 15:32:10 +10:00
Greg Wilkins beca81c990
Fixes #5053 CWE-331 (#5056)
Replace uses of Random with SecureRandom.
We do not believe any of these uses of Random represent any security vulnerability, but we are making this
change for an abundance of caution and to avoid warnings from 3rd party scanning tools.
2020-07-16 15:31:19 +02:00