Commit Graph

1259 Commits

Author SHA1 Message Date
Joakim Erdfelt 2812023db3
Issue #11040 - Deprecate PathResource.SUPPORTED_SCHEMES (#11057)
* Using ResourceFactoryInternals.isSupported(URI) instead.
2023-12-14 13:54:11 -06:00
Simone Bordet 8f019b96b0 Fixes #11064 - Jetty 12: NPE if MultiPartFormData.setFilesDirectory() is not called.
Now trying to use $JETTY_BASE/work, otherwise throwing IllegalArgumentException with a descriptive message.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-14 19:44:05 +01:00
Ludovic Orban d974c4d798
Improve the dump output of ConcurrentPool (#11036)
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-12-14 19:24:53 +01:00
Simone Bordet 583bf0a28f Added tests to set the encoder/decoder dynamic table size to zero.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-14 09:17:26 +01:00
Simone Bordet e259dfaa81
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-13 21:32:26 +01:00
Jan Bartel d926380651
Refactor eeX plus.security and plus.annotation classes to core (#11030)
* Refactor eeX plus.security and plus.annotation classes to core
2023-12-13 06:34:55 +01:00
Simone Bordet 9888c67a11
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-12 20:25:17 +01:00
Simone Bordet 8a12ed57df
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-12 20:21:12 +01:00
Greg Wilkins b0d259118c
Fixes #10956 - Reviewed Expect 100 Continue Handler (#10957)
Removed duplicate handling from servlet. Now only handled in core in HttpChannelState and protected it from concurrent writes.
Added additional tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-12 16:01:11 +01:00
Joakim Erdfelt 835ec6f467
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/12.0.x/properties-update 2023-12-11 09:19:08 -06:00
Lachlan bd342ac6e0
Merge pull request #11034 from jetty/jetty-12.0.x-11021-websocket-upgradeListener
Issue #11021 - do not call UpgradeListener.onHandshakeResponse() in case of failures
2023-12-11 22:30:20 +11: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
Simone Bordet 80c24fc876
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-09 18:08:12 +01:00
Joakim Erdfelt 5dbd14efd0
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/12.0.x/properties-update 2023-12-07 13:13:28 -06:00
Joakim Erdfelt 271b1ee2df
Merge remote-tracking branch 'jetty-11.0.x' into jetty-12.0.x 2023-12-06 15:21:13 -06:00
Joakim Erdfelt c582c2122b
Removing no longer used `jetty.byteBufferPool.*` properties
* `jetty.byteBufferPool.retainedHeapMemory`
* `jetty.byteBufferPool.retainedDirectMemory`
2023-12-06 14:52:54 -06:00
Joakim Erdfelt 3402fd58d4
Property `jetty.gzip.dispatcherTypes` no longer used in Jetty 12 2023-12-06 14:50:52 -06:00
Joakim Erdfelt 7d30f2e122
Property `jetty.statistics.gracefulShutdownWaitsForRequests` no longer used in Jetty 12 2023-12-06 14:49:58 -06:00
Simone Bordet 8638d80bd5
Fixes #10277 - Review read failures impacting writes. (#10948)
* Separated read failures from write failures.
* In this way it is possible to read even if the write side is failed and write even if the read side is failed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-06 21:48:47 +01:00
Joakim Erdfelt d29eae280d
Making jdbc.schema configurations visible to tooling
The commented out (and optional) configurations

* `jetty.session.jdbc.schema.schemaName`
* `jetty.session.jdbc.schema.catalogName`

Are not represented as an empty key=value pair
so it wasn't being found by tooling.
2023-12-06 14:19:03 -06:00
Greg Wilkins 71354331e5
Issue #11014 - Cleanup of relative redirect handling Jetty-12 (#11019)
* Cleanup of relative redirect handling #11014
+ Handle request relative redirects
+ Moved to Response
+ Changed default to allow relative
* Updates to javadoc
2023-12-07 07:14:11 +11:00
Olivier Lamy 499d6127c8
Issue #11024 fix dependencies from jetty-security which should be test only
Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-12-06 21:00:33 +10:00
Jan Bartel fd1c1e3c9b
Refactor JNDI across environments for common JNDI components that can be in core (#10897)
* Refactor jndi and plus to extract ee agnostic classes to jetty-core
2023-12-05 23:48:20 +01:00
Joakim Erdfelt 9a044fda67
Merge remote-tracking branch 'release/12.0.4' into jetty-12.0.x 2023-12-04 16:12:09 -06:00
Ludovic Orban 5b30fee459 Allocate the one byte array only when needed
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-12-04 19:26:46 +01:00
Ludovic Orban 8484a9da70 Fix ContentSourceInputStream mis-behaving in the presence of empty chunks
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-12-04 19:26:46 +01: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
Lachlan 876796d7ca
Issue #10926 - add support for CombinedResource in AttributeNormalizer (#10927)
* #10926 - skip existence check if only one Normalizer
* fix for AttributeNormalizer

---------

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: gregw <gregw@webtide.com>
2023-11-30 13:02:13 -06:00
Simone Bordet 5d355ef473
Fixes #10943 - Flaky test ReservedThreadExecutorTest.testBusyEvict.
Made assert logic for aggressive reserved thread eviction more robust.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-29 17:38:14 +01: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 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 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
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
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 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
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
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