Commit Graph

831 Commits

Author SHA1 Message Date
Lachlan 76cc130d17
Merge pull request #10420 from eclipse/jetty-12.0.x-10402-ServletChannelRecycle
Issue #10402 - do not recycle ServletChannel if aborted
2023-08-29 15:00:34 +10:00
Lachlan Roberts 0a2cfab4a8 Issue #10402 - rename ServletChannelState open() to openOutput()
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-29 14:59:59 +10:00
Simone Bordet 5a8c5bc8c7
Fixes #10353 - Questions about porting WebSocket APIs to jetty-core 12 (#10354)
* Added direct WebSocket upgrade in the Jetty core WebSocket APIs.
* Updated the WebSocket documentation.
* Optimized WebSocketMappings.getMatchedNegotiator() to avoid allocating a lambda for every invocation.
* Cleaned up core.server.WebSocketUpgradeHandler.
* Expanded websocket docs to mention how the demand mechanism works.
* Fixed code examples with correct demand handling.
* Javadocs for api.Callback.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-28 17:46:12 +02:00
Lachlan Roberts 1c1cc0296b remove debugging printlns
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-28 15:50:14 +10:00
Lachlan Roberts 27d0c7a181 Issue #10402 - do not recycle ServletChannel if aborted
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-28 15:48:29 +10:00
Greg Wilkins 8ed56b3466
Implement containsLast in HttpFields (#10340)
Fully implement list iterator so that we can efficiently check for the last item in a multi header list.

---------

Signed-off-by: gregw <gregw@webtide.com>
2023-08-26 10:05:29 +10:00
Lachlan ff02d3b086
Merge pull request #10394 from eclipse/jetty-12.0.x-10383-AsyncListenerTest
Issue #10383 - suppress stack traces from AsyncListenerTest
2023-08-25 18:14:41 +10:00
Lachlan 5c7a222697
Merge pull request #10313 from eclipse/jetty-12.0.x-10295-formAuthDispatch
Issue #10295 - implement EE10 FormAuthenticator with dispatch option
2023-08-25 16:14:40 +10:00
Lachlan Roberts a4055a21b0 revert change to stopTimeout in AsyncListenerTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-25 16:09:47 +10:00
Lachlan Roberts b9e915b70e Issue #10383 - Modify ServletChannelState to not warn on QuietExceptions
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-25 15:40:41 +10:00
Olivier Lamy ff2e36e239
Jetty 12.0.x fix cache issue with maven invoker (#10393)
---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-08-25 01:34:41 +02:00
Simone Bordet 4c32dfc4d8
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-24 18:56:21 +02:00
Lachlan Roberts f00296ce06 Issue #10383 - suppress stack traces from AsyncListenerTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-24 19:58:50 +10:00
Lachlan Roberts bb67a8aaeb Issue #10383 - suppress stack traces from AsyncListenerTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-24 19:53:29 +10:00
Simone Bordet 9d908839cf Fixes #10338 - ErorrHandler#writeErrorJson is private
Made the writeErrorXYZ() methods protected in ErrorHandler for core, ee9 and ee10.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-23 18:03:13 +02:00
Simone Bordet 7f1d262aee
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-23 15:47:15 +02:00
Greg Wilkins 8f5590c1d9
Fix #10349 ContentType set twice (#10358)
Fix #10349 which was caused by a put of ContentType being intercepted as a remove followed by an add.  The remove was incorrectly forgetting the charset without reference to the source of the charset.
2023-08-23 22:31:57 +10:00
Lachlan Roberts dadd5b0c04 fix bug in ServletContextRequest.wrap
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-23 12:37:20 +10:00
Lachlan Roberts 5a28d48b93 Move ServeAs code to Request, so it can be used elsewhere
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-23 12:32:46 +10:00
Lachlan Roberts 7e875d1411 make the ServeAs.PathWrapper take HttpURI instead of String
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-23 11:23:19 +10:00
Lachlan Roberts d319431281 rename to TestUserIdentity
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-23 11:06:14 +10:00
Ludovic Orban 1fff9787bd #10226 - handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-22 10:17:33 +02:00
Ludovic Orban ded90926f6 #10330 - fix tests after merge
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-22 10:17:33 +02:00
Ludovic Orban dd6a971f27 #10330 - Fix broken EE10 DefaultServlet range requests
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-22 10:17:33 +02:00
Lachlan Roberts f0953e4d29 add javadoc and rename AuthenticationState.ServeAs.PathWrapper
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-22 15:02:37 +10:00
Olivier Lamy 97e1527ed6
Jetty 12.0.x use Maven build cache for PRs and branches except jetty-12.0.x main branch (#9871)
* apply configuration/changes for build cache

Signed-off-by: Olivier Lamy <olamy@apache.org>

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-08-22 02:46:46 +02:00
Simone Bordet 486ec677cf
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-21 10:43:49 +02:00
Simone Bordet 7de4b6a0e9
Fixes #10315 - ServletInputStream::isReady results in IllegalArgument… (#10343)
Made sure that when HttpServletRequest.isReady() returns false, it is possible to call it again without getting an exception.

Fix ProxyServletTest.testExpect100ContinueRespond100ContinueSomeRequestContentThenFailure by flipping the input state to IDLE before unblocking a blocking read.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2023-08-21 08:51:47 +02:00
Simone Bordet 660ba4bbe5
Fixes #10284 - Document all HttpFields methods (#10308)
* Added javadocs where missing and updated existing in both HttpFields and HttpField.
* Removed HttpFields.takeAsImmutable() because it had a confusing semantic.
* Deprecated HttpFields.[Mutable|Immutable]HttpFields and moved their implementation to top level package private classes.
* Deprecated HttpField.valueParameters(), as there is an identical getValueParameters()
* Fixed inconsistencies of HttpField.value, where in most cases could not be null, but in one case was allowed; now it can never be null.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-18 10:19:36 +02:00
Lachlan Roberts f9f42d5303 add testing for core FormAuthenticator dispatch
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-18 12:27:28 +10:00
Lachlan Roberts 6e5ea8196f cleanups and changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-18 11:55:36 +10:00
Lachlan Roberts a418e0db71 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-10295-formAuthDispatch 2023-08-18 11:43:31 +10:00
Joakim Erdfelt 235c5086aa
Improved `MetaInfConfigurationTest` cases (#10282)
+ Establish baseline tests for MetaInfConfiguration in preparation for PRs that adjust lookup / scan behaviors of MetaInfConfiguration
2023-08-17 20:25:41 -05:00
Jan Bartel fe1831008a
Issue #10323 Fix ee10 Request.isRequestedSessionIdValid (#10331)
* Issue #10323 Fix ee10 Request.isRequestedSessionIdValid
2023-08-18 03:19:53 +02:00
Jan Bartel 5160ad29ef
Issue #10207 Update missing JSP message. (#10320)
* Issue #10207 Update missing JSP message.
2023-08-18 03:19:06 +02:00
Greg Wilkins 042841a7c6
Fix #10306 getServerHost (#10311)
Fix #10306 getServerHost
2023-08-18 10:11:39 +10:00
Greg Wilkins 5aea1e44b7
Experiment/12/improve default servlet (#10222)
* Improve Jetty 12 DefaultServlet

 + don't wrap the httpServletRequest unless necessary due to wrapping
 + don't wrap the httpServletResponse unless necessary due to wrapping
 + send content asynchronously if large and unfiltered
 + Remove unused boolean return from ServletChannel.handle
 + added TODOs where range request handling could calculate content length
 + Call multipartlength, even though it is always -1
 + Use static for bytes written
2023-08-18 00:54:05 +10:00
Lachlan Roberts 1b6b8331fa fix bug in SecurityHandler and remove EE10 FormAuthenticator
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-17 15:44:20 +10:00
Lachlan Roberts 9208629e95 make the dispatch feature work for core securityHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-17 15:32:40 +10:00
gregw db5209e97a Implement ServeAs in core SecurityHandler 2023-08-17 11:18:08 +10:00
Lachlan Roberts 798f455e6f fix checkstyle error
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-15 20:25:09 +10:00
Lachlan Roberts 715e1fe333 call listeners when doing an initial forward dispatch
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-15 20:19:54 +10:00
Lachlan Roberts 7b95ec4f7b Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-10295-formAuthDispatch 2023-08-15 20:05:07 +10:00
Greg Wilkins cdf5035ab2
Various Cleanup in ServletChannel (#10064)
remove lambdas for clarity
 TODO Non-blocking error dispatch
 TODO isHandled does not exist
 TODO checkAndPrepareUpgrade and implement servlet upgrade?
 remove unused variables
 review javadoc (including any warnings)
 review any compiler or findbug warnings (if any)

---------

Signed-off-by: gregw <gregw@webtide.com>
2023-08-15 20:02:25 +10:00
Lachlan Roberts 87396105fb Issue #10295 - use ServletChannel states for the security handler dispatch
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-15 11:18:25 +10:00
Lachlan Roberts e9ab7498a9 Issue #10295 - create an EE10 FormAuthenticator
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-15 10:38:02 +10:00
Greg Wilkins 16b00e2a13
Allow better configuration of WebAppContext classloader (#10163)
* Allow better configuration of WebAppContext classloader

Moved the creation of a WebAppContext classloader into an extensible method.

* Allow better configuration of WebAppContext classloader

EE8/9 also

* Allow better configuration of WebAppContext classloader

Only close loader if context created it.
2023-08-11 11:24:46 +10:00
Joakim Erdfelt 9c324326c5
Merge `release/12.0.0` back into `jetty-12.0.x` (#10237)
* Updating to version 12.0.0

* Updating to version 12.0.1-SNAPSHOT
2023-08-08 00:55:19 +02:00
Simone Bordet b781a92517
Fixed javadocs generation.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-07 18:22:22 +02:00
Lachlan Roberts 466b75cec2 fix websocket demo for ee8 jetty-12
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-07 11:17:39 +10:00