Commit Graph

29039 Commits

Author SHA1 Message Date
Olivier Lamy 3f2c30a48f
fix nightly snapshot deploy by skipping deploy and javadoc for build-resources module (#10940)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-11-30 07:09:39 +10:00
Olivier Lamy 0fd294ba4a
save jetty-home artifacts in case of label save-home (#10931)
* save jetty-home artifacts in case of label save-home
* save home from local repo as it is installed even with cache

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-11-30 07:04:58 +10:00
Simone Bordet 82fbf3d4e9
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-29 13:54:49 +01:00
Simone Bordet 0d5d4d4edb
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-29 13:49:45 +01:00
Simone Bordet 3ca6afe5c6
Merge pull request #10938 from garydgregory/10.x_use_string_isempty
Use String#isEmpty()
2023-11-29 13:47:05 +01:00
Simone Bordet eba74d9bad
Improved ManagedSelector.toString() to report also the section statistics.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-29 13:14:34 +01:00
Simone Bordet d166056f18
Fixes #10384 - ServletChannel now using proper state changes for calls to ErrorHandler to avoid IllegalStateExceptions (#10930)
Reworked the ServletChannel.handle() SEND_ERROR case.
Now using the proper state changes to call ErrorHandler.handle(), which is asynchronous, so that IllegalStateExceptions are avoided.

Restored idle timeout tests in ee9/ee10 AsyncMiddleManServletTest.

Fixed notification of request destroyed in ErrorHandler: must be before completing the callback, since listener may call Servlet APIs that should see the ServletChannel state before the ErrorHandler callback changes it.
Updated ServletChannelState.isAsync() and isAsyncStarted().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-29 09:19:04 +01:00
Simone Bordet a15a4b0a23
Fixes #10919 - EE10 multipart parsing may include '\r' at the front under certain conditions (#10921)
Setting MultiPart.Parser.crContent=false when the boundary is matched.
This is necessary when a read chunk ends with \r\n, and then matches the boundary on the next read chunk, and avoids to emit the CR as part content.

Fixed case of a chunk ending with \r.

Fixed case where a CR in a previous chunk is followed by a boundary at index 0 in the next chunk.
The CR should not be emitted as content, and crContent reset to false.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-29 09:17:04 +01:00
Olivier Lamy 0b252e59d2
add some mvn jvm settings (#10874)
* add some mvn jvm settings

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

* just a bit more memory

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

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-11-29 06:48:31 +01:00
Jan Bartel df42cb276d
Improve Resource use in MetaInfConfiguration (#10889)
* Reduce resources kept open by MetaInfConfiguration
---------

Co-authored-by: Greg Wilkins <gregw@webtide.com>
2023-11-29 02:11:47 +01:00
Greg Wilkins 41382b4e0e
Fix null host when checking virtual host #10922 (#10923)
Use the `Request.getServerName` static and check for null host.
2023-11-29 11:25:00 +11:00
Gary Gregory 0efee0bf95 Use String#isEmpty() 2023-11-28 17:46:42 -05:00
Simone Bordet d1da7269f6
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-28 15:58:48 +01:00
Simone Bordet e82efe5c81
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-28 15:57:59 +01:00
Simone Bordet 573ea67cda
Fixed locking.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-28 15:57:19 +01:00
Simone Bordet 8c10ea8a9b
Fixes #10912 - Document Request listeners (#10920)
* Fixes #10912 - Document Request listeners

* Documented Request listeners and updated javadocs.
* Removed code in HttpChannelState.onIdleTimeout() that was automatically complete the Handler callback.
* Invoking failure listeners only once (although HttpChannelState.onFailure() may be called multiple times).
* Made sure that in ChannelCallback.succeeded() the last stream send uses the ChannelResponse as Callback, like it is done in Response.write().
* Moved Request listeners tests from various test classes into RequestListenersTest.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-28 12:56:17 +01:00
Ludovic Orban 5a273f0d3e
Align Core, ee9 and ee10 `AbstractTest` and fix ee9 H3 tests (#10929)
* #10386 Align core, ee9 and ee10 AbstractTest:
 - use the same temporary folder technique
 - configure the SSL contexts the same way

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-11-27 17:14:31 +01:00
Simone Bordet c6fa7a8766
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-27 15:41:17 +01:00
Simone Bordet 6ea2f68da0
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-27 15:34:24 +01:00
Ludovic Orban b77a8054a2 #9900 backport Accurate implementation of H3 Request.beginNanoTime()
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-11-27 15:31:25 +01:00
Ludovic Orban 65c8b58843 #9900 backport Accurate implementation of H2 Request.beginNanoTime()
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-11-27 15:30:56 +01:00
Olivier Lamy 358c8a7e29
upgrade those versions as Intellij fail because of this (#10924)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-11-27 19:19:39 +10:00
Greg Wilkins 7dcab84b91
Fix jetty 12.0.x transient timeouts (#10844)
Fixes #10234

* Introduced transient failures in reads where a failure chunk has last=false.
* Transient failure now do not fail the handler callback.
* Improve eeN ContentProducer to more carefully assert transient and terminal errors + enable HttpInputIntegrationTest
* Do not add connection: close to the response when the error is transient
* Rework ChunksContentSource to support null chunks
* Added tests to verify the new transient failure cases
* Review all code that handles failure, and handling correctly transient failure, either by making them fatal, and/or by failing Content.Source.

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Olivier Lamy <olamy@apache.org>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Olivier Lamy <olamy@apache.org>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Chad Wilson <chadw@thoughtworks.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-23 15:25:03 +01:00
Ludovic Orban b9bd3f2e83
Accurate implementation of H3 `Request.beginNanoTime()` (#10911)
#9900: Accurate implementation of H3 Request.beginNanoTime()

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-11-23 14:34:19 +01:00
Ludovic Orban 382638b84d #9900: simplify and add test
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-11-23 14:33:48 +01:00
Ludovic Orban 52e182486d #9900: remove unneeded changes
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-11-23 14:33:48 +01:00
Ludovic Orban b270724ff5 #9900: cleanup h2c nanotime code
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-11-23 14:33:48 +01:00
Ludovic Orban 0ebea03577 #9900: only take begin nanotime once per stream
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-11-23 14:33:48 +01:00
Ludovic Orban 03f2e76da5 #9900: Accurate implementation of H2C Request.beginNanoTime()
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-11-23 14:33:48 +01:00
Lachlan 4a91cb7464
Merge pull request #10902 from jetty/jetty-12.0.x-addContainerResource
do not add duplicate jars to MetaData containerResources
2023-11-23 08:36:12 +11:00
Ludovic Orban f61fa04cef
Fix flaky `BlockingTest` (#10878)
* Make timed waits more reliable
* Remove all timed assertions to make this test non-flaky
* Synchronize the threads on their state to make sure blocking happens + add timeout annotation
* Use assertThrows where exceptions are expected

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-11-21 17:08:25 +01: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
Simone Bordet da2c601cd7
Fixed flaky test.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-20 09:02:34 +01:00
Lachlan Roberts 9a9d8fb6ea throw IllegalArgumentException if container resource is not readable
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-11-20 10:09:26 +11:00
Simone Bordet e933116997
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-19 22:09:10 +01:00
Simone Bordet b5af73e086
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-19 17:41:10 +01:00
Simone Bordet f82844e2a2 Fixes #10891 - Support the "Partitioned" cookie attribute.
Added support in oej.http.HttpCookie.
Bridged support for Servlet cookies via the cookie Comment attribute.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-19 17:37:18 +01:00
Olivier Lamy d84a74b3af
Merge branch 'jetty-10.0.x' into jetty-11.0.x 2023-11-18 10:51:55 +10:00
Olivier Lamy af13a72978
use correct scm coordinates (#10876)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-11-18 01:49:30 +01:00
Simone Bordet d69dfc8d23
Fixes #10879 - Improve redirect handling with reproducible content (#10880)
* Fixes #10879 - Improve redirect handling with reproducible content

Now both the redirect and the authentication ProtocolHandlers will abort the request on response success.
If the request is already completed, the abort attempt will be a no-op, proceeding as usual.
Otherwise, the request upload will be aborted and a new request sent with the reproducible content.

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>
2023-11-17 11:53:36 +01:00
Lachlan Roberts 4b0f45f121 warn on duplicate container resource for ee9
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-11-17 16:11:10 +11:00
Lachlan Roberts e7bac208b3 warn on duplicate container resource
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-11-17 16:10:18 +11:00
Lachlan Roberts 96657eb0a7 do not add duplicate jars to MetaData containerResources
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-11-17 13:16:46 +11:00
Olivier Lamy 11c510af1b
no need to annotate PRs with analysis results (#10901)
* no need to annotate PRs

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-11-16 08:10:16 -06:00
Joakim Erdfelt 3d8e3a1e40
Revert "Fix dependabot.yml"
This reverts commit 45750f84c3.
2023-11-15 13:29:30 -06:00
Joakim Erdfelt 45750f84c3
Fix dependabot.yml 2023-11-15 13:27:16 -06:00
Joakim Erdfelt 328b4a980e
Merge pull request #10896 from jetty/jetty-12.0.x-disable-duplicate-for-javadoc
disable duplicate finder for javadoc as it is plenty of unzipped sources
2023-11-15 07:41:08 -06:00