Commit Graph

612 Commits

Author SHA1 Message Date
Olivier Lamy a617784e8e
Remove duplicated classes from test session, fix some to be able to run in parallel and not restarting 3rd party for each tests (#9782)
---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-06-09 06:47:36 +10:00
Jan Bartel 1bc1aacbe7
Fix redirect demo; fix links to sources for demos; fix blog link (#9890)
* Fix redirect demo; fix links to sources for demos; fix blog link

* Update jetty-home/src/main/resources/modules/demo.d/root/index.html

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

---------

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-06-08 18:24:08 +02:00
Jan Bartel 4ec7dc73f6
Jetty 12.0.x 9072 move core ee classes (#9883)
* Issue #9072 refactor jetty-ee module to remove it

* Remove old ee imports in module-info.javas

* Remove jetty-ee from deps

* Fix references to jetty-ee for osgi

* Update jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Deployable.java

Co-authored-by: Greg Wilkins <gregw@webtide.com>

---------

Co-authored-by: Greg Wilkins <gregw@webtide.com>
2023-06-08 18:22:57 +02:00
Jan Bartel c13c869e3d
Jetty 12.0.x 9760 fix cookie parsing (#9894)
* Add test to show failure

* Fix #9760 EE9 Cookies

Fix #9760 Only set path and domain if they are not blank

* Fix #9760 EE9 Cookies

Fix #9760 Only set path and domain if they are not blank
Switch on violation rather than type

* Handle legacy cookie version and comment

* Handle cookie version and comment

---------

Co-authored-by: gregw <gregw@webtide.com>
2023-06-08 18:20:39 +02:00
Greg Wilkins c0de62b2c6
Jetty 12 graceful contexts (#9867)
Removed all shutdown mechanisms from ContextHandler
Fixed GracefulHandler

---------

Signed-off-by: gregw <gregw@webtide.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2023-06-07 21:05:49 +02:00
Jan Bartel 18a0738923
Issue #9879 re-enable and fix rewrite demo (#9882) 2023-06-07 19:13:44 +02:00
Jan Bartel 6b362c03a9
Issue #9657 (#9781) 2023-06-06 11:06:48 +02:00
Ludovic Orban c1f1a6018b Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-06-05 17:31:13 +02:00
Simone Bordet 22641f1267
Fix/jetty 12 restore ee n fcgi (#9796)
* Restored ee9 FastCGIProxyServlet and TryFilesFilter.
* Restored ee10 FastCGIProxyServlet and TryFilesFilter.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-06-05 16:50:11 +02:00
Greg Wilkins 1c01a49149
Jetty 12 context initial ClassLoader (#9866)
* Ensure environment classloader in ContextHandler
* Set the initial classloader in ContextHandler
* WebAppContext uses initial classloader
2023-06-05 16:49:15 +02:00
Simone Bordet 8c4e75bf8d
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-28 00:34:49 +02:00
Lachlan Roberts 152030de09 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-05-22 18:05:21 +10:00
Jan Bartel 5c2e7afcef
Issue #9785 context path set incorrectly for ee9 (#9786) 2023-05-22 09:35:47 +02:00
gregw d2b71d7968 Fix tests broken by #9774
Cross context is not support
2023-05-19 09:25:13 +02:00
Jan Bartel f6822a2162
Issue #9774 Disallow cross context (#9775)
* Issue #9774 Disallow cross context
2023-05-18 15:11:50 +02:00
Greg Wilkins 068a60a868
Simplified QuotedStringTokenizer (#9729)
Simplified QuotedStringTokenizer #9729
* Now implements a simple subset of `quoted-string` from RFC9110
* introduced builder
* Extracted QuotedStringTokenizer interface and re-introduced the legacy implementation
* Re-introduced the ability to have unescaped \ in filenames
* Whitespace is Character.isWhiteSpace
* Disable test pending RFC8187
* No OWS around =
2023-05-18 08:25:53 +02:00
gregw 3e5d479f39 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
# Conflicts:
#	jetty-ee9/jetty-ee9-servlets/src/test/java/org/eclipse/jetty/ee9/servlets/CrossOriginFilterTest.java
2023-05-18 00:18:45 +02:00
Simone Bordet e52e95f788
Fixes #9766 - jetty-12 ee9 ServerPush failures. (#9776)
* Restored dispatch=true for pushed requests.
* Restored tests that use the Servlet APIs to push.
* Ensured that pushed streams have request content EOF.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-17 15:42:05 +02:00
Ludovic Orban ac2765c98d Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-05-15 10:09:36 +02:00
Jan Bartel 2261ce9a50
Issue #9762 ee9 double parses cookies (#9764)
* Issue #9762 ee9 double parses cookies

* implemented the TODOs to cache servlet cookies

---------

Co-authored-by: gregw <gregw@webtide.com>
2023-05-12 17:14:44 +02:00
Ludovic Orban 143509c214 #9639 fix typo in null check resulting in invalid warnings being emitted
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-05-10 15:51:31 +02:00
Lachlan Roberts b0f292b4ca cleanups of old jaspi dependencies
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-05-09 15:11:53 +10:00
Lachlan Roberts 99a673b900 minor change to jaspi poms
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-05-09 14:57:22 +10:00
Jan Bartel 626ab7a964
Issue #9743 changeSessionId should throw ISE if no session (#9744) 2023-05-08 23:25:57 +10:00
Greg Wilkins 4c16e6a707
Jetty 12 content length 0 take3 (#9740)
* Optimize Content-Length: 0 handling

Create and use a pre-encoded HttpFields.CONTENT_LENGTH_0 constant
Used the constant in more places
renamed the `putLongField` methods of HttpFields.Mutable to just `put`
Fixed wrong docs examples
2023-05-07 19:22:15 +02:00
Jan Bartel 11a67fbdd7
Issue #9731 infinite loop in role refs (#9732)
* Issue #9731 infinite loop in role refs

* Update jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/UserIdentityScope.java

Co-authored-by: Greg Wilkins <gregw@webtide.com>

---------

Co-authored-by: Greg Wilkins <gregw@webtide.com>
2023-05-06 00:58:22 +10:00
Simone Bordet baf72248aa
Fixed tests after merge.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-04 22:36:00 +02:00
Simone Bordet 3463e42861
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-04 12:08:00 +02:00
Lachlan Roberts e79cf08d05 removing deprecated PushSessionCacheFilter in 12.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-05-04 09:52:21 +10:00
Lachlan Roberts bc681a7539 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-05-04 09:48:38 +10:00
Simone Bordet adf5754836
Fixes #9552 - Jetty 12 - Rewrite of the Jetty WebSocket APIs. (#9652)
* Removed unnecessary classes, among which `BatchMode`, `CloseStatus`, etc.
* Coalesced all listener interfaces into `Session.Listener`.
* Moved `RemoteEndpoint` functionality to `Session`.
* Renamed `WebSocketPolicy` to `Configurable`.
* Renamed `WriteCallback` to just `Callback`, as it is now also used for some listener methods.
* Renamed `@OnWebSocketConnect` to `@OnWebSocketOpen`
* Renamed `Session.Listener.onWebSocketConnect()` to `onWebSocketOpen()`.
* Removed `@WebSocket` annotation attributes, because they were just a subset of the configurable ones and they can be configured directly on the Session instance.
* Removed `Session.suspend()` and `SuspendToken`, and introduced `Session.demand()`.
* Introduced `@WebSocket.autoDemand` and `Session.Listener.AutoDemanding` to support automatic demand upon exit of WebSocket handler methods.
* Removed `FrameHandler.isAutoDemanding()` and `CoreSession.isAutoDemanding()`.
* Changed the responsibility of demand from `WebSocketCoreSession` to `FrameHandler`, which in turn may delegate to `MessageSink`.
* Updated MessageInputStream to fail if an exception is thrown by the application.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-02 16:42:40 +02:00
Greg Wilkins 7275bf15a9
Jetty 12.0.x core security (#9405)
core security module

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: gregw <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Jan Bartel <janb@webtide.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-02 15:35:49 +02:00
Lachlan 0271077f46
Merge pull request #9678 from eclipse/jetty-12.0.x-9466-DeploymentException
Issue #9466 - review where we throw DeploymentException for WebSocketContainer.connectToServer
2023-05-01 14:27:22 +10:00
gregw 063a3337d9 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-04-29 13:37:16 +02:00
Lachlan Roberts cf32a9cc8c Issue #9466 - review where we throw DeploymentException for WebSocketContainer.connectToServer
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-04-26 11:05:53 +10:00
Jan Bartel 5b4a0136b6
Remove unused session methods. (#9658) 2023-04-24 19:42:44 +10:00
Simone Bordet 7ffdd7fd05
Removed unnecessary "Adapter" classes.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-04-21 18:49:51 +02:00
Olivier Lamy 46018e6057
Jetty-12.0.x tests in parallel (down build time on CI from 1h25 to 55min) some modules are still not parallel due to some static usage (#9635)
* parallel tests runs

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-04-21 10:42:12 +10:00
Simone Bordet 8fe3dbad16
Fixes #9438 - Jetty 12: Review JakartaWebSocketClientContainer use of… (#9626)
* Simplified the use of reflection.
* Improved `setShutdownContainer()` to take into account multiple web applications,
so it is now a `Map<ClassLoader, ContainerLifeCycle>` so that each web application
has its own container to register `JakartaWebSocketClientContainer` instances.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-04-13 09:50:18 +02:00
Lachlan Roberts 47af2a378f Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-04-11 14:08:13 +10:00
gregw 46eb5c7966 Extended fix from #9629
Allow 400 or EOF for more multipart tests
2023-04-10 13:23:42 +02:00
Simone Bordet 744b37f80b
Fixes #7608 - Jetty-12 MetaData cleanup needed (#9618)
* Removed unnecessary constructors from MetaData, MetaData.Request and MetaData.Response.
* Removed MetaData.Request.getURIString() (available as getHttpURI().toString()).
* Renamed MetaData.getFields() -> getHttpFields(), as they can be headers or trailers.
* Renamed MetaData.Request.getURI() -> getHttpURI().
* Normalized handling of contentLength, now always -1 (rather than Long.MIN_VALUE) if unknown.
* Permutated MetaData.Response constructor parameters to be consistent with MetaData.Request.
* MetaData.Request's method and httpURI must be non-null.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-04-07 21:23:01 +02:00
Simone Bordet 110e092a6e
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-04-06 16:18:58 +02:00
Greg Wilkins 10abcbcf8e
Fix MultiPartServletTest race. (#9629)
The writing of the large content may see an EofException before the 400 response has been processed and delivered to the listener.
2023-04-05 22:41:13 +02:00
Greg Wilkins 8636666eec
Jetty 12 - Remove ISO-8859-1 fallback decoding during UTF-8 decoding (#9507)
* Deleted the Ut8fStringBuffer and Utf8Appendable classes in favour of just having Utf8StringBuilder
* Simplified the Utf8StringBuilder and CharsetStringBuilder APIs and improved their exception throwing.
* Allow for replacement characters without throwing

---------

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: gregw <gregw@webtide.com>
Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-04-04 10:57:07 +02:00
Greg Wilkins 693ac7ffbf
Jetty-12 Core Session listeners (#9499)
Added lifecycle and value listeners to jetty core session (needed for core security).

Signed-off-by: Olivier Lamy <olamy@apache.org>
Co-authored-by: Olivier Lamy <olamy@apache.org>
2023-04-03 15:23:10 +02:00
Joakim Erdfelt 9b7763c9be
Jetty 12 - Review BOMs (#9551)
* Fixes #9467 - Review BOMs
* Skip deploy of select test artifacts
2023-03-29 16:34:02 -05:00
Joakim Erdfelt 420ac22985
Issue #8292 - Align ee9/ee10 quickstart testing (#9546) 2023-03-29 16:33:14 -05:00
Joakim Erdfelt 17b3ffe841
Issue #8740 - Move `org.eclipse.jetty.server.context.ManagedAttributes` to core `jetty-server` (#9549) 2023-03-29 13:01:52 -05:00
Joakim Erdfelt 75dbc52f16
Separate weld versions by ee# (#9544) 2023-03-29 10:25:31 -05:00