Commit Graph

3028 Commits

Author SHA1 Message Date
Joakim Erdfelt c61106907c
Issue #7277 - Allow `Request.getLocalName()` and `.getLocalPort()` to be overridden (#7316)
* Introduce `HttpConfiguration.setServerAuthority(HostPort)`
  to influence `ServletRequest.getServerName()` and `ServletRequest.getServerPort()`
* Introduce `HttpConfiguration.setLocalAddress(SocketAddress)`
  to influence `ServletRequest.getLocalName()`, `ServletRequest.getLocalPort()`, and `ServletRequest.getLocalAddr()`
* Adding test cases

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-01-05 13:24:20 -06:00
Joakim Erdfelt a8f60c86e1
Issue #7297 - Removing log4j 1.x (#7314)
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-12-22 15:31:56 -06:00
Ludovic Orban 068c24a744 #7243 ByteBufferPool and RetainableByteBufferPool now reset the buffer's endianness on release
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-09 12:43:31 +01:00
Lachlan Roberts 0b37ee960f Issue #7124 - change to javadoc from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-11-23 16:38:18 +11:00
Lachlan Roberts 911abf3413 Issue #7124 - deprecate AbstractLifeCycleListener
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-11-22 17:08:53 +11:00
Lachlan Roberts e92022b652 Issue #7124 - Add default methods on LifeCycle.Listener interface
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-11-22 15:56:11 +11:00
Lachlan Roberts 67c27f1ba7 Issue #7078 - use shared CompressionPools in WebSocketExtensionFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-11-04 21:54:19 +11:00
Joakim Erdfelt 73b154cb60
Close Resources opened from java.nio.file.Files API calls (#7048)
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-10-26 17:28:15 -05:00
Greg Wilkins 3f82d69f64
Improve #4275 ambiguous URIs (#6939)
* Improve #4275 ambiguous URIs

A URI like `/foo/%2e%2e;/bar` should be ambiguous both because of the encoded dots and because of the parameters.  This means that the default setting of jetty-9 is a bit more secure as this path is considered ambiguous if either Violation.SEGMENT or Violation.PARAM is set.
2021-10-11 15:02:49 +11:00
Lachlan Roberts 0bc8095cda Issue #6969 - fix mod file filtering for log4j
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-10-08 13:05:25 +11:00
Joakim Erdfelt 3dee3423f6 Updating to version 9.4.45-SNAPSHOT 2021-09-27 18:22:11 -05:00
Joakim Erdfelt 8da83308ee Updating to version 9.4.44.v20210927 2021-09-27 17:45:51 -05:00
Olivier Lamy b286497d0a
Issue #3514 backport of mod files filtering (#6897)
* Issue #3514 backport of mod files filtering

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>

* ignore keystore file

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>

* fix directory name

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>

* fix directory name

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>

* fix inclusion of keystore file

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2021-09-24 11:59:30 +10:00
Greg Wilkins 0abc9f9a7d
Fix #6870 Encode control characters (#6874)
Fix #6870 URIUtil.encodePath encodes control characters

* Better test for wider range of characters
* Encode all control characters

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2021-09-22 08:55:09 +10:00
Greg Wilkins 9b3fb19dc3
Fix #6860 IPv6 Format (#6861)
Fix #6860 IPv6 format by adding an extensible HttpChannel method

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
2021-09-22 08:21:17 +10:00
Simone Bordet 525fcb3119
Fixes #6603 - HTTP/2 max local stream count exceeded (#6639)
Made MAX_CONCURRENT_STREAMS setting work on a per-connection basis.
Updated Pool javadocs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Greg Wilkins <gregw@webtide.com>
2021-08-30 16:00:15 +02:00
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