Commit Graph

3012 Commits

Author SHA1 Message Date
Simone Bordet 05c08e1602 Backport from 10.0.x of the changes using Awaitility.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-08-25 17:08:06 +02:00
Simone Bordet 9897c1b06e Fixes #6646 - SmallThreadPoolLoadTest on windows flaky.
Fixed occurrences of Callbacks that did not override getInvocationType() to properly declare whether they block or not.

Added test case for blocking writes for both client and server.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-08-25 10:45:16 +02:00
Simone Bordet b2a023675c
Fixes #6652 - Improve ReservedThreadExecutor dump. (#6653)
Fixes #6652 - Improve ReservedThreadExecutor dump.

Filtering out non-reserved threads in dump() and doStop().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Greg Wilkins <gregw@webtide.com>
2021-08-24 23:12:08 +02:00
Simone Bordet 693663a4ce Fixes #6624 - Non-domain SNI on java17
Java 17 only allows letter|digit|hyphen characters for SNI names.

While we could bypass this restriction on the client, when the SNI bytes arrive to the server they will be verified and if not allowed the TLS handshake will fail.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-08-18 17:07:20 +02:00
Greg Wilkins ac73b3aa20
Disable ipv6 test for #6624 (#6625)
Temp disable of test that is breaking the build.
2021-08-17 14:07:33 +10:00
Joakim Erdfelt 51e6335c7a
Merge pull request #6572 from eclipse/jetty-9.4.x-windows-test-overhaul
Issue #5684 - windows test overhaul
2021-08-03 07:45:27 -05:00
Joakim Erdfelt 500e6f2762 Issue #5684 - scan interval is variable on windows
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-08-02 05:05:32 -07:00
Greg Wilkins 735e97d5c7
Non blocking ReservedThreadExecutor (#6535)
A call to offer must never block, nor even yield, since to do so give an opportunity for the allocated CPU core to change, defeating the whole purpose of the class.
There is also some reasonable level of diagnostic warnings if a reserved thread misses too many offers consecutively, based on tracking the state of the reserved thread.

Remove the stack data structure entirely.  ReservedThreads all poll the same SynchronousQueue and tryExecute does a non blocking offer.

Added test for busy shrinking

Remember last time we hit zero reserved threads

Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2021-07-29 09:46:48 +10:00
Ludovic Orban ea5c8ed994 #6491 do not depend on awaitility
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-07-28 09:24:47 +02:00
Ludovic Orban 020770f82d #6541 improve testConcurrentAccess perf
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-07-28 09:24:47 +02:00
Ludovic Orban 9726a0987f #6541 improve testTake perf
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-07-28 09:24:47 +02:00
Joakim Erdfelt 7741ecc1e5 Issue #5684 - Window's test overhaul
+ Migrate from @DisabledOnOs(WINDOWS) to assumptions on capabilities instead.
+ Fix other outstanding windows testing issues.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-07-27 15:02:45 -07:00
Joakim Erdfelt e37a708c40 Updating to version 9.4.44-SNAPSHOT 2021-06-30 06:30:31 -05:00
Joakim Erdfelt 526006ecfa Updating to version 9.4.43.v20210629 2021-06-30 05:57:49 -05:00
Simone Bordet f045b5a3ba
Issue #6473 - Improve alias checking in PathResource. (#6477)
* Issue #6473 - Improve alias checking in PathResource.

* Reverted %-escape handling for URI query parts.
* Performing canonicalization in ServletContext.getResource(),
  and improving alias checking in ContextHandler.getResource().
* Performing canonicalization checks in Resource.addPath() to avoid
  navigation above of the root.
* Test added and fixed.
* Various cleanups.
* Improved javadoc and comments

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Greg Wilkins <gregw@webtide.com>
2021-06-29 15:40:45 +02:00
Greg Wilkins 122a78aafc
Issue #6473 - canonicalPath refactor & fix alias check in PathResource (#6474)
Reduce multiple canonicalPath calls with single alias check in PathResource
Revert to decoding and the normalizing URLs so that subsequent canonicalPath calls are noops. 
Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
2021-06-28 17:10:11 +10:00
Lachlan a3effb19c4
Issue #6447 - Deprecate support for UTF16 encoding in URIs (#6467)
- Merge from PR #6457.
- Also brought some other ComplianceModes back to disable ambiguous empty segments, and ambiguous encodings.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-06-24 17:16:56 +10:00
Greg Wilkins 265886543f
QueuedThreadPool always interrupts threads in doStop
Fix #6400 QueuedThreadPool always interrupts threads in stop
Even if there is no timeout, always interrupt pool threads to attempt to stop them.
 + Refactored exit condition for Runner main loop to make it clearer that it always checks running status
 + More comments to explain counts
 + Fixed inner loop of ReservedThread to ensure it always checks running status
 + Adjusted timing of the test to make it less flakey. Still a worry!
2021-06-17 07:54:21 +10:00
Joakim Erdfelt 5c130e400a Updating to version 9.4.43-SNAPSHOT 2021-06-04 12:49:12 -05:00
Joakim Erdfelt 5cd5e6d237 Updating to version 9.4.42.v20210604 2021-06-04 12:24:37 -05:00
Greg Wilkins 40a9fa7995
Explain EatWhatYouKill naming (#6342)
Explained EatWhatYouKill naming.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2021-06-04 15:13:21 +02:00
Simone Bordet 04df6d4ec2
Fixes #6276 - Support non-standard domains in SNI and X509. (#6296)
* Fixes #6276 - Support non-standard domains in SNI and X509.

Backported support for IP addresses in X509 (from #5379).
Introduced SslContextFactory.Client.SniProvider to allow applications to specify the SNI names to send to the server.
Improved logging of SNI processing.
Skip X509 matching over IP addresses when the host does
not look like an IP address, to avoid reverse DNS lookup.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-05-21 19:02:43 +02:00
Ludovic Orban b7b16a880b review comment: improve readability
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-05-19 09:38:18 +02:00
Ludovic Orban 593f4225f8 only release connection when channel got released to avoid double connection release race condition
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-05-19 09:38:18 +02:00
olivier lamy 97a2a9993f bump to next version 9.4.42-SNAPSHOT
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2021-05-18 13:06:42 +02:00
Simone Bordet 68296911b7 Fixes #6099 - Cipher preference may break SNI if certificates have different key types.
Updated the logic in SslContextFactory.Server.sniSelect(...) to check if there is
any certificate that matches, and if so return a null alias in the hope to be called
again and pick the right alias for the SNI.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-05-10 10:38:42 +02:00
Joakim Erdfelt b15b37f944
Merge pull request #6187 from eclipse/jetty-9.4.x-6186-no-null-logger
Issue #6186 - Add null protection to Log/Logger API
2021-04-21 06:26:14 -05:00
Lachlan eca8edcea5 Create FileBufferedResponseHandler to buffer responses into a file. (#6010)
FileBufferedResponseHandler adds an HttpOutput.Interceptor to buffer all responses into a file until the output is closed. This allows the commit to be delayed until the response is complete and thus headers and response status can be changed while writing the body.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-04-19 15:02:43 +10:00
Joakim Erdfelt ee29860b18
Issue #6186 - Add null protection to Log/Logger API
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-04-16 10:44:54 -05:00
Joakim Erdfelt 241ca2c2a0 Updating to version 9.4.41-SNAPSHOT 2021-04-13 16:24:42 -05:00
Joakim Erdfelt b881a57266 Updating to version 9.4.40.v20210413 2021-04-13 15:32:28 -05:00
Jesse McConnell d23925809d
Updating to version 9.4.40-SNAPSHOT 2021-03-25 10:06:56 -05:00
Jesse McConnell ee95f92d70
Updating to version 9.4.39.v20210325 2021-03-25 09:33:14 -05:00
Jesse McConnell 7dacf1503f
reset release to 9.4.39-SNAPSHOT 2021-03-25 09:03:35 -05:00
Jesse McConnell be786489a8
reset release to 9.4.39-SNAPSHOT 2021-03-25 08:52:25 -05:00
Olivier Lamy e0111e581a Updating to version 9.4.40-SNAPSHOT 2021-03-25 03:39:19 +00:00
Olivier Lamy e56edccd03 Updating to version 9.4.39.v20210325 2021-03-25 03:20:25 +00:00
Greg Wilkins ebe8311333
Use Files.isSameFile to check Resource equality (#6093)
Use Files.isSameFile to check Resource equality
Avoid using canonical and instead use Files.isSameFile

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2021-03-24 12:54:21 +01:00
Joakim Erdfelt 9e29832a8a
Issue #6052 - Applying changes from review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-03-15 09:22:04 -05:00
Joakim Erdfelt a3a1478c91
Issue #6052 - Removing MethodHandle from TypeUtil static initializer
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-03-15 09:05:25 -05:00
Joakim Erdfelt d7982f869b
Issue #6052 - make ModuleLocation optional on Android
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-03-10 10:45:29 -06:00
Olivier Lamy b899261497
fix some mod files: some url using http to https, use maven central if possible, upgrade log4j2 to 2.14.0 (#6048)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2021-03-10 19:12:47 +10:00
Simone Bordet 132f4b9ab1 Fixes #6034 - SslContextFactory may select a wildcard certificate during SNI selection when a more specific SSL certificate is present.
Now matching certificates are sorted, non-wildcard first, so that a more specific alias is returned.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-03-09 09:55:44 +01:00
Joakim Erdfelt 5fed958e08 Updating to version 9.4.39-SNAPSHOT 2021-02-24 14:52:43 -06:00
Joakim Erdfelt 288f3cc745 Updating to version 9.4.38.v20210224 2021-02-24 14:16:09 -06:00
Simone Bordet c9cd1e4758
Merge pull request #5995 from eclipse/jetty-9.4.x-5994-qtp_free_threads
Fixes #5994 - QueuedThreadPool "free" threads
2021-02-24 09:31:03 +01:00
Greg Wilkins 8bd4a9fad8
Fix #5999 ArrayIndexOutOfBounds for unicode in HttpURI segment (#6000)
Fixed ArrayTrie to not throw if passed a unicode character.
2021-02-23 20:03:45 +01:00
Simone Bordet 530c14e7b3 Issue #5994 - QueuedThreadPool "free" threads
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-02-23 18:12:55 +01:00
Simone Bordet 64e01beeeb Fixes #5994 - QueuedThreadPool "free" threads
Introduced to QueuedThreadPool:

* getMaxReservedThreads()
* getAvailableReservedThreads()
* getAvailableThreads()
* getReadyThreads()
* getLeasedThreads()

Also few small code cleanups.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-02-22 23:02:12 +01:00
Joakim Erdfelt ea2a76ed3b Updating to version 9.4.38-SNAPSHOT 2021-02-19 09:44:28 -06:00