Commit Graph

2921 Commits

Author SHA1 Message Date
Joakim Erdfelt edaadff55b Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
Joakim Erdfelt e46af88704 Updating to version 9.4.34.v20201102 2020-11-02 08:03:51 -06:00
Simone Bordet a1b3d3319d
Merge pull request #5491 from eclipse/jetty-9.4.x-5488-jetty-dir.css
Fixes #5488 - jetty-dir.css not found when using JPMS.
2020-11-02 10:40:19 +01:00
Joakim Erdfelt 249cb02a75
Issue #5535 - Removing irrelevant lines on test
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-30 11:22:46 -05:00
Joakim Erdfelt 074b4f90f7
Issue #5535 - Adding regex include/exclude of Protocols to SslContextFactory
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-30 10:29:35 -05:00
Joakim Erdfelt c969fba71a
Issue #5531 - Using .setExcludeProtocols correctly.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-29 20:28:21 -05:00
Joakim Erdfelt cff4771375
Issue #5531 - Test excluded protocol behavior
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-29 13:57:20 -05:00
Joakim Erdfelt dadd299e47
Cleanup of SslContextFactoryTest
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-29 13:44:21 -05:00
Greg Wilkins 7a0de6af3a
Fixes #5498 ServletHolder cleanup (#5514)
* Fixes #55498 ServletHolder cleanup

Various cleanups for #5498 including:
 + renaming multiple `_servlet` fields in inner classes to avoid confusion
 + better comments in prepare method to describe why it is needed
 + call prepare from Invoker servlet
 + The `_servlet` field is not set until after the servlet is initialized
 + Consistent wrapping of `SingleThreadedWrapper` now in `initServlet`
 + The `getServlet` method now looks the volatile `_servlet` to avoid locking if possible
 + The `handle` method now calls `getServletInstance` as servlet will have been initialized in `prepare`
 + Found and fixed race with making unavaiable servlet available again
 + fixed nanotime overflow
 + fixed several compiler warnings/suggestions
 + removed while true from unavailable servlet
 + Do not destroy servlets unless init has been called.
 + Added TODOs about calling predestroy on instances not created by the holder.
 + Do not destroy servlets unless init has been called.
 + Added TODOs about calling predestroy on instances not created by the holder.
 + improved dump and toString
2020-10-28 17:46:49 +01:00
Greg Wilkins 6698a314ee
Fixes #5521 ResourceCollection list NPE (#5523)
Fixes #5521 ResourceCollection list NPE
2020-10-28 15:23:29 +01:00
Simone Bordet 4a4a73df2e Fixes #5488 - jetty-dir.css not found when using JPMS.
Moved jetty-dir.css from jetty-util to jetty-server,
so that it can be found by ResourceHandler when using JPMS.

Updated DefaultServlet to call a ResourceHandler method
to retrieve the stylesheet.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-10-22 16:48:27 +02:00
Joakim Erdfelt e726eefb0b Updating to version 9.4.34-SNAPSHOT 2020-10-20 18:55:39 -05:00
Joakim Erdfelt 1be6875565 Updating to version 9.4.33.v20201020 2020-10-20 18:28:51 -05:00
Joakim Erdfelt fa6c8f7dec
Issue #5480 - Only delete non-persist temp dir if not-empty
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-20 17:19:54 -05:00
Joakim Erdfelt 0e98c370fd
Issue #5480 - NPE protection on IO.delete(File)
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-20 16:28:36 -05:00
Joakim Erdfelt fed8484d88
Merge pull request #5458 from eclipse/jetty-9.4.x-5451-temp-perms-cleanup
Issue #5451 - Removing file/dir permission management from codebase
2020-10-17 05:28:13 -05:00
Joakim Erdfelt 97f795160c Fixing windows build/test issues. 2020-10-16 13:54:27 -05:00
Joakim Erdfelt d612f12cf6
Issue #5451 - Removing file/dir permission management from codebase
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-16 13:17:28 -05:00
Joakim Erdfelt fdd880b66b
Issue #5451 - Cleanup of temp file cleanup.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-15 18:10:38 -05:00
Joakim Erdfelt 85e257fc98 Updating to version 9.4.33-SNAPSHOT 2020-09-30 11:53:09 -05:00
Joakim Erdfelt de97d26f7b Updating to version 9.4.32.v20200930 2020-09-30 11:03:24 -05:00
Joakim Erdfelt 3423375a97
Issue #5357 - Updating to https://eclipse.org/ (#5358)
* Issue #5357 - Updating to https://eclipse.org/

 - Removing redundant <url> refs in pom.xml
 - Correcting bad indenting from merge
 - Correcting mailing list references
 - Correcting bugs.eclipse.org references
 - Correcting text file references
 - Correcting html references
 - Correcting further references
 - Correcting download.eclipse.org reference
 - Adding test for demo-base /proxy/current/
 - Ensuring jetty-client is included in javadoc-proxy.war/WEB-INF/lib

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-29 11:02:32 -05:00
Joakim Erdfelt 6cf6b78a16
Issue #5246 - Adding DeflaterPool to GzipHandler.dump
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-17 10:27:15 -05:00
Greg Wilkins ba22c08fde
Alternative Pool Strategies (#5218)
* Speculative idea to make a pluggable Pool strategy

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Speculative idea to make a pluggable Pool strategy

 + javadoc

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Speculative idea to make a pluggable Pool strategy

 + Added a ThreadLocalStrategy for a single cached item
 + Tell strategies about newly reserved entries
 + Fixed multiplexing test that was dependent on the impl of the cache

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Speculative idea to make a pluggable Pool strategy

 + added tests

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Feedback from review

 + Don't have a fallback iteration, instead make a SearchStrategy and DualStrategy

* Feedback from review

 + split strategies into Cache and Strategies

* Feedback from review

 + Added reserve and release

* Improved Pool Strategies:

+ reverted to post notifications for removed, reserved and released.
+ Added a few more strategies that need to be benchmarked, that use the list iterator.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Testing all the different strategies

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* More simplifications and made LRU work (ish)

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* javadoc

* More javadoc

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* JMH Test

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* one strategy

Signed-off-by: gregw <gregw@webtide.com>

* test

Signed-off-by: gregw <gregw@webtide.com>

* Split implementations:

 + pluggable strategies
 + hard coded

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* More benchmarks

* Built in strategy

* removed strategies version and simplified to single configurable solution.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* better javadoc

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Updated ConnectionPool classes to use Pool strategies

* Small javadocs fixes.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>

* Updates from review

* javadoc

Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2020-09-16 18:27:26 +02:00
Greg Wilkins 7ecf42e3f8
Issue #5162 CDI embedded integration improvements (#5177)
* Issue #5162 CDI embedded integration improvements

Clean up CDI integration and documentation to better support embedded usage.
 + made listener public
 + added utility class for SCIs

* Issue #5162 CDI embedded integration improvements

Clean up CDI integration and documentation to better support embedded usage.
 + moved EmbeddedWeldTest to jetty-embedded

* fix javadoc

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #5162 CDI embedded integration improvements

ventilated text

* fix test pom

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Fixed javadoc

* Fixed javadoc

* Issue #5162 CDI embedded integration improvements

Moved tests to jetty-cdi to avoid consequences to other tests in embedded

* trailing new line

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Feedback from review
2020-09-07 14:00:20 +02:00
Lachlan Roberts 1d1bbc49f7 Issue #5201 - change format for QTP dump from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-04 13:55:26 +10:00
Lachlan Roberts 26ae875d1c Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-5201-QueuedThreadPoolDump 2020-09-03 15:00:47 +10:00
Lachlan Roberts 85c8c6510e Issue #5201 - Fix issues with test after changes to QTP dump
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-03 10:34:18 +10:00
Lachlan Roberts 0a59a2b090 Issue #5201 - simplify the QueuedThreadPool detailed dump
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-03 06:58:55 +10:00
Simone Bordet bec2cdbee7 Fixes #5204 - SNI does not work with PKIX.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-27 18:06:12 +02:00
Simone Bordet f084f3c09b Fixes #5204 - SNI does not work with PKIX.
Introduced SslContextFactory.Server.aliasMapper, a function
that transforms the alias.
This function is invoked by the SNI logic to unmangle the
alias leaked by the TLS implementation due to bug
https://bugs.openjdk.java.net/browse/JDK-8246262.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-26 22:25:27 +02:00
Greg Wilkins 1159fa399f
Issue #5095 - XmlConfiguration Parser Pool (#5148)
* Issue #5095 XmlConfiguration Parser Pool

Use a pool of parsers rather than a shared static

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Updates from review

* Updates from review
Tests for cache size and acquire with creator

* Method no longer required with Reservation

* update from the feedback on the feedback of the feedback from the review.

Moved enable to Entry, removed Reservation class and clarified usage in javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

* removed fake test

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

updates from review
2020-08-24 18:00:28 +02:00
Simone Bordet 2d3f0e0c10 Improved logging and toString() implementations,
small refactorings in code and tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-22 17:31:12 +02:00
Simone Bordet 26c2d34439 Issue #4809 - Set a max number of requests per connection.
Improved Pool.reserve(int) logic to take into account the
fact that an entry can accommodate maxMultiplex acquires.

This reduces connection openings for HTTP/2 in case of
spikes of requests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-13 16:52:06 +02:00
Joakim Erdfelt 9b5b43a2fd
Fixing KeyStoreScannerTest
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-12 15:50:11 -05:00
Joakim Erdfelt e632d2454b
Merge pull request #5131 from eclipse/jetty-9.4.x-5129-extraclasspath-glob
Issue #5129 - WebAppContext.setExtraClasspath(String) cleanup
2020-08-12 10:08:53 -05:00
Simone Bordet 4a0af046b8 Closes #4809 - Set a max number of requests per connection.
Implemented as part of #4975.

Added a test case that proves that the connection is closed
when the max usage count is reached.

Improved logging.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-12 16:14:51 +02:00
Greg Wilkins 25e3f1c1e0
Pool class refinements (#5117)
* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Updates from review

* Updates from review
Tests for cache size and acquire with creator

* Method no longer required with Reservation

* update from the feedback on the feedback of the feedback from the review.

Moved enable to Entry, removed Reservation class and clarified usage in javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

fixed javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

fixed javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

fixed javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

updates from review
2020-08-12 11:27:25 +02:00
Simone Bordet f73b282050
Merge pull request #5128 from eclipse/jetty-9.4.x-5079-ipv6_brackets
Fixes #5079 - :authority header for IPv6 address not having square br…
2020-08-11 20:04:46 +02:00
Joakim Erdfelt 4a19ef4bb2 Issue #5129 - disabling ResourceTest.testGlobPath on WINDOWS for stability 2020-08-11 08:51:04 -05:00
Joakim Erdfelt 150dc22f0a
Issue #5129 - Reverting Resource.fromReferences()
+ Will migrate to jetty-10.0.x

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-11 08:15:27 -05:00
Joakim Erdfelt 5b8c343a2b
Issue #5129 - Fleshing out glob testcase a bit more
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-10 14:46:32 -05:00
Joakim Erdfelt 52f5218900
Issue #5129 - Resource.fromReferences no longer needs DefaultFactory
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-10 14:42:02 -05:00
Joakim Erdfelt e8098986e6
Issue #5129 - Simplify Resource reference list behavior
+ Introduce new Resource.fromReferences to help with
  parsing delimited resource reference lists.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-10 11:30:39 -05:00
Joakim Erdfelt 55f4e4fa63
Issue #5129 - WebAppContext.setExtraClasspath(String) cleanup
+ More tests for both relative and absolute path references
+ More testing that will trigger quirks on Windows builds
  so that we can catch regressions faster
+ Reworked WebInfConfiguration to be glob aware in a way
  similar to how WebAppClassLoader behaves.
+ Reworked Resource.newResource(String) to delegate
  canonical path resolution to PathResource
+ Guarded PathResource's usage of Path.toAbsolutePath()
  to ignore valid conditions where the Path cannot be
  resolved to an absolute path (yet)
+ Normalize resolved paths in PathResource

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-10 10:42:38 -05:00
Joakim Erdfelt 4957c091d0
Correct typo
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-10 10:40:56 -05:00
Simone Bordet d53d9d8a1d Fixes #5079 - :authority header for IPv6 address not having square brackets.
On the client:
* Origin.Address.host is passed through HostPort.normalizeHost(),
so that if it is IPv6 is bracketed.
Now the ipv6 address passed to an `HttClient` request is bracketed.
* HttpRequest was de-bracketing the host, but now it does not anymore.

On the server:
* Request.getLocalAddr(), getLocalName(), getRemoteAddr(),
getRemoteHost(), getServerName(), when dealing with an IPv6 address,
return it bracketed.
The reason to return bracketed IPv6 also from *Addr() methods is that
if it is used with InetAddress/InetSocketAddress it still works, but
often it is interpreted as a URI host so brackets are necessary.
* DoSFilter was blindly bracketing - now it does not.

Added a number of test cases, and fixed those that expected
non-bracketed IPv6.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-07 15:53:19 +02:00
Ludovic Orban e9dad975e6 Re-implement HTTP connection pooling with a non-queuing algorithm
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-07-31 10:36:43 +02:00
Greg Wilkins 66ec16006e
Issue #5088 Review ContextHandler locking (#5094)
* Issue #5088 Review ContextHandler locking

The locking was primarily as a memory guard for the availability status, which was already volatile.
Have instead using an AtomicReference with a simple state machine layered on top of start/stop lifecycle.
There was also protection for AttributesMap, which is no longer needed as AttributesMap is now concurrent.

* Issue #5088

updates from review

* Issue #5088

updates from review (better this time)
2020-07-30 17:58:34 +02:00
Joakim Erdfelt 36b42ca65d
Issue #3916 - Fix whitespace between boundary and part headers
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-07-30 09:13:01 -05:00