Commit Graph

172 Commits

Author SHA1 Message Date
Joakim Erdfelt ffffdcc3c8
Updating to version 12.0.8 2024-03-29 14:31:57 -05:00
Jan Bartel 2fc7ad87d8
Reintroduce Cross Context Dispatch in Jetty 12 (#11451)
Re-introduce some support for cross context dispatch
2024-03-25 18:44:44 +01:00
Simone Bordet 763999d08a
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-03-19 11:43:29 +01:00
Greg Wilkins c05ae3bb83
Implemented addBeanFromConstructor (#11319)
Added mechanism to safely add beans from a super constructor of ContainerLifeCycle


Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2024-03-13 17:52:55 +01:00
Joakim Erdfelt 18b2a7c201
Updating to version 12.0.8-SNAPSHOT 2024-02-29 16:00:27 -06:00
Joakim Erdfelt c89aca8fd3
Updating to version 12.0.7 2024-02-29 15:18:56 -06:00
Lachlan d3f19bb947
Merge pull request #11402 from jetty/jetty-12.0.x-11398-WebSocket-CloseChannelException
Issue #11398 - allow frames to be demanded in WebSocket onOpen
2024-02-27 17:11:53 +11:00
Lachlan Roberts 4ca044486e PR #11402 - move methods to original position in WebSocketConnection
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-02-23 11:18:17 +11:00
Lachlan Roberts 436f4f8507 PR #11402 - changes for review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-02-22 15:56:52 +11:00
Greg Wilkins f07d812698
Fix #11414 URI schema and port normalization (#11416)
* Issue #11414 - use HttpURI instead of URIUtil to have a single point of spec behavior

* Issue #11414 - enforce lowercase scheme in HttpConfiguration.secureScheme

* Issue #11414 - Scheme produced on `Location` header is lowercase

* Issue #11414 - Scheme to lowercase

* Issue #11414 - Scheme to lowercase

* Revert change to HttpClient

* Added schema port knowledge to URIUtil

* Fixed tests for normalized URIs

* updates from review

* updates from review

* Fix tests

* Restored methods as deprecated

* More testing

---------

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2024-02-20 20:12:55 +01:00
Greg Wilkins 08174a3042
Fix #11401 StringBuilder rather than StringBuffer (#11406) 2024-02-19 14:52:17 +00:00
Lachlan Roberts 0ece73b769 PR #11402 - add check for null networkBuffer in WebSocketConnection
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-02-16 16:19:31 +11:00
Lachlan Roberts 783c14cec4 Issue #11398 - do not deliver messages until onOpen completes
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-02-15 13:07:28 +11:00
Lachlan 55e3072247
Merge pull request #11357 from jetty/jetty-12.0.x-ServerWebSocketContainer-ensure
Issue #11356 - Allow ServerWebSocketContainer to be created without ContextHandler
2024-02-14 20:18:20 +11:00
Lachlan Roberts 25fb7be7a9 Issue #11398 - allow frames to be demanded in WebSocket onOpen
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-02-14 15:20:34 +11:00
Lachlan Roberts e3c9e2fd54 PR #11357 - fix checkstyle errors
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-02-02 13:41:56 +11:00
Lachlan Roberts bbdaf072db PR #11357 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-02-02 13:31:28 +11:00
Lachlan Roberts 077f9bcf61 PR #11357 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-02-02 13:20:52 +11:00
Lachlan Roberts ee1d24ffdb Issue #11356 - Allow ServerWebSocketContainer to be created without ContextHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-01-30 20:39:13 +11:00
Joakim Erdfelt 82d9177f0c
Updating to version 12.0.7-SNAPSHOT 2024-01-29 21:04:51 -06:00
Joakim Erdfelt 78ab6e6ba1
Updating to version 12.0.6 2024-01-29 20:42:49 -06:00
Lachlan 554d5b19d5
Issue #11275 - explicitly close websocket endpoint after error from DispatchedMessageSink (#11343)
* Now properly handling errors
* Added test for partial read

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-01-29 15:13:25 +01:00
Lachlan cb60e2a968
Merge pull request #11309 from jetty/jetty-12.0.x-ensureCallbackComplete-WebSocketCoreSession
ensure callback is always completed in WebSocketCoreSession
2024-01-29 11:29:31 +11:00
Simone Bordet b5d0fd6f2f
Fixes #11096 - IllegalAccessException when invoking WebSocket endpoint methods in Jetty 12 (#11229)
Changed `JettyWebSocketFrameHandlerFactory` to use an application MethodHandle.Lookup (rather than a server one) when creating listener metadata.
This fixes the JPMS problem so that now JPMS applications do not need any additional configuration to invoke endpoints.
The (acceptable) downside is that anonymous inner classes (that are not public) cannot be used as listener endpoints.

This change affects core and EE10 WebSocket; EE9 and EE8 WebSocket have not been fixed (so they allow anonymous inner classes but are broken in JPMS).

Renamed "connectLatch" fields to "openLatch" in test classes.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Olivier Lamy <olamy@apache.org>
Co-authored-by: Olivier Lamy <olamy@apache.org>
2024-01-25 16:40:48 +01:00
Ludovic Orban aa3873fb2f
Fix incorrect reliance on autoDemand when handlers are not configured (#11304)
#11303 fix incorrect reliance on autoDemand when handlers are not configured

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-01-24 09:11:25 +01:00
Lachlan Roberts 6b20ee0753 ensure callback is always completed in WebSocketCoreSession
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-01-24 12:00:46 +11:00
Lachlan Roberts 1e0c0b42ab ensure callback is always completed in WebSocketCoreSession
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-01-24 11:57:34 +11:00
Simone Bordet 2a3e6f72c7
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-01-02 20:14:28 +01:00
Lachlan Roberts 37a296dfdc Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x-11081-websocketRace 2023-12-20 12:12:13 +11:00
Joakim Erdfelt 96eea590ee
Updating to version 12.0.6-SNAPSHOT 2023-12-18 08:25:22 -06:00
Joakim Erdfelt 3aed62e495
Updating to version 12.0.5 2023-12-18 08:05:54 -06:00
Lachlan 62210d39c2
add deployment exception for non Jakarta WebSocket endpoints used in ServerEndpointConfig (#11032)
* Issue #11009 - add test for bad Jakarta endpoint
* Issue #11009 - ensure endpoint deployable before adding ServerEndpointConfig
* add same test and fix for ee9

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-12-17 13:37:10 +01:00
Simone Bordet 3167e0cb6e
Fixes #11037 - Serialize HttpClient request failures (#11038)
* Introduced IteratingCallback.abort(Throwable) to serialize calls to onCompleteFailure().
* HttpSender now uses IC.abort() to serialize the abort of the request.
* Fixed HTTP/2 and HTTP/3 to dispatch the sending of the request to another thread, to free the reader thread that read the server preface.
* HTTP/1.1 does not need this, because just created connections do not need to read.
* Improved handling of request abort, as it can be from two sides: external and internal.
* Calling abort() instead of failed() for WebSocket flushers.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-15 14:44:15 +01:00
Lachlan Roberts 363ebb3918 Issue #11021 - do not call UpgradeListener.onHandshakeResponse() in case of failures
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-12-11 14:48:07 +11:00
Joakim Erdfelt 8597033339
Updating to version 12.0.5-SNAPSHOT 2023-11-30 13:33:03 -06:00
Joakim Erdfelt 9b415c6424
Updating to version 12.0.4 2023-11-30 13:14:15 -06:00
Ludovic Orban 59a7bc1575 fix flaky testTcpCloseNoDemand test
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-11-21 09:58:29 +01:00
Lachlan 3d03339d43
Issue #10749 - WebSocketClient should expose upgrade request/response (#10761)
* Allow UpgradeListener to see Response in case of non-successful upgrade
* Using a boolean to track whether request was upgraded
* Improved exception handling in HttpUpgraderOverHTTP.
* Avoid using log warnings in CoreClientUpgradeRequest.
* Delayed setting of this.upgraded after the last throw statement.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-20 21:58:38 +01:00
Lachlan b8ece59544
WebSocketUpgradeHandler should not require ContextHandler (#10768)
* WebSocketUpgradeHandler should not require a ContextHandler
* Exposing the ServerWebSocketContainer as attribute also when creating the WebSocketUpgradeHandler with only the Server, to allow dynamic configuration of WebSocket endpoints.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-20 19:30:19 +01:00
Lachlan ecb90e8d0f
Issue #10687 - WebSocket remembers mappings on restart (#10773)
* Clear websocket mappings on server stop
* Fix core WebSocketUpgradeHandler on restart
* Avoid usage of deprecated WebSocketUpgradeHandler.configure() method.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-20 17:09:56 +01:00
Olivier Lamy b88908236e
Jetty 12 add duplicate classes finder plugin to avoid sames classes with different content coming from different jars (#10767)
* add duplicate finder plugin

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-11-07 06:37:41 +01:00
Joakim Erdfelt c01baac85c
Updating to version 12.0.4-SNAPSHOT 2023-10-26 22:47:29 -05:00
Joakim Erdfelt a873259fd5
Updating to version 12.0.3 2023-10-26 22:24:43 -05:00
Lachlan Roberts ee702b01c2 Issue #10734 - fix websocket CoreSession getParameterMap
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-10-16 12:18:37 +11:00
Olivier Lamy fcc88274a4
Jetty 12.0.x use automatic formatter for poms to have same style for every poms (#10578)
* apply spotless sort pom

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-10-12 03:51:36 +02:00
Joakim Erdfelt 6b3f760b80
Updating to version 12.0.3-SNAPSHOT 2023-10-09 21:16:46 -05:00
Joakim Erdfelt b01e3611cf
Updating to version 12.0.2 2023-10-09 20:59:14 -05:00
Simone Bordet 5be34089ef
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-28 11:41:34 +02:00
Ludovic Orban 344c501940 Merge remote-tracking branch 'origin/jetty-11.0.x' into fix/merge-from-11 2023-09-25 17:40:39 +02:00
Greg Wilkins 57b953be67
Reintroduce an Exception type for invalid UTF-8 (#10553)
Introduce `Utf8CharacterCodingException`  and `Utf8IllegalArgumentException` as a substitutes for the removed `Utf8Appendable.NotUtf8Exception`.

* Updates from review
2023-09-22 12:24:42 +10:00