Commit Graph

1276 Commits

Author SHA1 Message Date
Simone Bordet 2505d0e8a6
Merge pull request #11086 from jetty/jetty-12.0.x-11081-websocketRace
Issue #11081 - fix race condition in WebSocket FrameHandlers (jetty-12)
2023-12-29 14:44:58 +01:00
Lachlan 965e4af425
Merge pull request #11083 from jetty/jetty-12.0.x-11080-multipartRetainableChunks
Issue #11080 - copy ByteBuffer for non-retainable chunks
2023-12-20 12:19:30 +11: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
Lachlan Roberts 592ccf7da0 Issue #11080 - copy ByteBuffer for non-retainable chunks
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-12-19 15:11:43 +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
Simone Bordet e481b45cda
Follow up for issue #10933 and associated PR #10949.
Fixed HttpChannelTest.testOnFailure().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-17 13:52:09 +01: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 fbf8dddae4
Follow up for issue #10933 and associated PR #10949.
Most often failures come from the read side, so failure listeners are now serialized in the _readInvoker.
This avoids that a failure while parsing a request (e.g. an early EOF) results in concurrent executions of the invokeOnContentAvailable task and the invokeOnFailureListeners task.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-17 13:33:59 +01:00
Simone Bordet c5e40f5d90 Implemented server-side reset of the stream using error code NO_ERROR in case the request content is not read.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-15 18:23:06 +01:00
Joakim Erdfelt 15c3369b16
Issue #10852 - Add ResourceHandler.setUseFileMapping(boolean) feature (#11071) 2023-12-15 11:12:26 -06:00
Lachlan 35af2d8984
Do not use HttpStream.Wrapper in SizeLimitHandler (#11051)
* Do not use HttpStream.Wrapper in SizeLimitHandler
* Updated the SizeLimitHandlerServletTest
* Udpated documentation and javadocs.

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-12-15 15:11:57 +01:00
Simone Bordet eb1e9eb8c4
Fixes #11016 - Jetty 12 IllegalStateException when stopping Server wi… (#11017)
* Made ServletChannel error handling more robust.
A failure in error handling is now remembered so that the Handler callback can be failed later.
* Avoid failing the Handler callback from ServletChannel.abort(), as it is too early: should be failed when processing the TERMINATED state, similarly to when it is succeeded.
* Removed dead code from HttpConnection.SendCallback.reset(), since response is always non-null.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-15 15:09:20 +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
Joakim Erdfelt fa7ea8a13c
Merge pull request #11067 from kohlschuetter/pr/11066
Fixes #11066 - URIUtilTest.testFileUriGetUriLastPathSegment on macOS
2023-12-15 06:35:07 -06:00
Greg Wilkins f776d3e4fb
Issue #10933 - Fix AsyncIOServlet test issues (#10949)
* Call ServletChannelState.asyncFailure from error listener. Fix #10933
* Separate invokers for read side and write side
* document async error issues
* updates from review
* updates from review
2023-12-15 10:34:03 +11:00
Christian Kohlschütter 665f61a3e7 Fixes #11066 - URIUtilTest.testFileUriGetUriLastPathSegment on macOS
We special-cased this test on macOS to support NFD form normalization.

That may no longer be necessary, and therefore the test currently fails.

Run the default expectations, and, in case of failure on macOS, test
against the old workaround.
2023-12-14 22:25:29 +01:00
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