Commit Graph

25871 Commits

Author SHA1 Message Date
Joakim Erdfelt c6c0eb0313
Jetty-12 : Immutable ResourceCollection and Context based mount management (#8337)
* Immutable ResourceCollection with mount management.

* Internal List<Resource> is now immutable so that .getResources() cannot be modified.
* Improved Resource.toJarFileUri implementation that keeps the deep archive references
* Introducing Resource.mountCollection() methods
  + ResourceCollection is now a private class
  + Resource.mountCollection() returns a Mount
  + Places that use this technique are now putting the Mount in the context's beans for the context to close those mounts.
* Cleanup names/comments in FileSystemResourceTest
* Adding missing test of attempting to create a Resource from a URI `jar:file:foo.jar!/` while not mounted.
* Reworked ResourceCollection behaviors based on feedback.
  + Eliminated all Resource.mountCollection() methods except the Collection<URI> one.
* Eliminated Resource.mountIfNeeded(Resource)
* Eliminated Resource.fromList implementations
* Introduced @gregw Resource.of() implementations
* Introduced Resource.split() to honor old split logic from Jetty 9/10/11, with glob support, but now it only converts to List<URI>
* Remove IOException from Mount.root() method
* ResourceCollection now flattens and uniques any nested ResourceCollection entries it encounters
* Expanded ResourceCollectionTest to cover more code paths
* Add ResourceTest for new split() method
* Fixing testcase to use a directory that exists on setExtraClasspath
* Increase reliability of WebAppContextTests
* Updates for working with webapp.extraClasspath
* Introduced Resource.unwrapContainer to help in servlet cases where the raw JAR path should be represented in a ServletContext attribute.
* Made FileSystemPool.containerUri just use new Resource.unwrapContainer
* webapp MetaData updated to use URIs references to Libs (not File objects)
* jetty-ee#-maven-plugin use URIs for its classpath tracking to aid in mounting issues later
* webapp extraClasspath supports raw JAR references as well as glob now, supported by Resource.split(String)
2022-07-28 08:59:17 -05:00
Lachlan 0f35590ab4
Merge pull request #8341 from eclipse/jetty-12.0.x-dispatcher-fixes
fix some tests for Jetty 12 ee10 servlets
2022-07-28 18:57:19 +10:00
Ludovic Orban b1d5f908a6 fix mounting/unmounting lifecycle of TLD resources
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-28 10:16:02 +02:00
Ludovic Orban 1cb80cf4ca fix compilation error and re-enable tests
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-28 10:16:02 +02:00
Ludovic Orban 905352816d make sure TLD file actually is a file
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-28 10:16:02 +02:00
Ludovic Orban a84a86d820 handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-28 10:16:02 +02:00
Ludovic Orban 9f0463b545 remove old Resource defaultUseCache mechanism
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-28 10:16:02 +02:00
Lachlan Roberts 0abe0ccf48 go to base ServletApiRequest to extract source query params
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-28 17:28:58 +10:00
Lachlan Roberts c435f56d0c fix issues with parameter merging for request dispatches
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-28 14:46:26 +10:00
Ludovic Orban be7f0826ac only create buffer of existing, non-directory Resources via newReadableByteChannel
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-27 16:04:22 +02:00
Ludovic Orban 0c0c333970 get rid of EmptyResource
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-27 16:04:22 +02:00
Ludovic Orban 4856a7d065 keep, un-deprecate and rename Resource.getReadableByteChannel() and Resource.getInputStream()
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-27 16:04:22 +02:00
Greg Wilkins 2275e1c2c6
Refactored MultiException into ExceptionUtil (#8340) 2022-07-27 18:07:57 +10:00
Greg Wilkins 8d9c32bdee Include FileSystemPool is the server dump so we can monitor any leakage.
Added JMX annotations
Added as unmanaged bean to Server
2022-07-27 15:26:07 +10:00
Greg Wilkins 2e9c6de1e2 Immutable ResourceCollection
Include FileSystemPool is the server dump so we can monitor any leakage.
2022-07-27 15:20:27 +10:00
Lachlan Roberts eed5ad24cd #8343 - fix issues with regex pathspec and query decoding
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-27 14:17:10 +10:00
Lachlan Roberts ce7dc44075 #8343 - add extra test for %2F and %3F in uri
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-27 12:25:43 +10:00
Lachlan Roberts e6db23afc5 fix use of canonicalPath after #8343
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-27 11:29:12 +10:00
Lachlan Roberts f81bdc9711 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-dispatcher-fixes 2022-07-27 11:27:26 +10:00
Olivier Lamy c7dc445530
add jetty-ee8-apache-jsp (#8344)
* add jetty-ee8-apache-jsp

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-07-27 11:08:08 +10:00
Greg Wilkins d369adf55b
Jetty 12.0.x canonical uri (#8343)
Somehow the URIUtil class had switched over the meaning of normal and canonical. This PR renames them to correct this:
 * canonical paths are always normal
 * Always canonicalize paths passed from the application
 * Switch the URIUtil names for canonical and normal
2022-07-27 09:58:50 +10:00
Ludovic Orban 32ef1616e6 #8285 - handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-26 13:47:44 +02:00
Ludovic Orban 38d22f3153 #8285 - improve Resource to mapped ByteBuffer logic
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-26 13:47:44 +02:00
Olivier Lamy ccd79c4b47
add ee8 openid (#8342)
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-07-26 19:26:34 +10:00
Lachlan Roberts b6bc0f0b07 fix tests in EncodedURITest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-26 15:25:34 +10:00
Lachlan Roberts ce8048c4bd fix tests in AsyncServletTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-26 15:04:45 +10:00
Lachlan Roberts d56a4e0dd3 normalize path when registering a pathSpec for Servlet/Filter
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-26 15:02:31 +10:00
Olivier Lamy 740e2b55f4
jetty 12.0.x ee8 quickstart (#8339)
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-07-26 14:30:41 +10:00
Lachlan Roberts ce3c0b7036 fix DispatcherForwardTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-26 13:34:59 +10:00
Lachlan Roberts 69c83c76a6 re-enable DefaultServletTest.testWelcomeServlet
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-26 11:36:44 +10:00
Greg Wilkins 83ae7afe2b Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-dispatcher-fixes 2022-07-26 11:07:27 +10:00
Joakim Erdfelt 0d75a87886
Adding comment about usage 2022-07-25 09:59:14 -05:00
Simone Bordet 69a7b06f06
Jetty 12.0.x retainable chunk (#8325)
Made Chunk implement Retainable, and protocol implementations
to link the RetainableByteBuffer all the way to the Chunk.

Extended Retainable to have both a retain() and a release() methods.

Removed HTTP/2's ISession and IStream, now just using HTTP2Session and HTTP2Stream.
Removed *.Adapter classes in favor of interfaces with default methods.

Javadoc additions and clarifications.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-07-25 13:22:14 +02:00
Olivier Lamy 02324c35e2 remove redundant option
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-07-25 19:57:44 +10:00
Olivier Lamy 82338660a8
add jetty-ee8-proxy (#8332)
* restore ee8 proxy

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-07-25 19:54:18 +10:00
Lachlan Roberts 9efce15804 reopen HttpOutput in same places as Jetty 11
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-25 16:56:39 +10:00
Joakim Erdfelt 1ea6ec603a
Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x 2022-07-24 21:31:39 -05:00
Joakim Erdfelt ba4405e05b
Comment/TODO updates for Jetty 12.0.x from review with @gregw 2022-07-24 21:31:30 -05:00
Simone Bordet bf93418b60
Fixed building of documentation.
Follow up to #8326.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-07-22 21:12:50 +02:00
Simone Bordet 0dd2ab6229
Re-enabled build of the documentation.
Follow up to #8326.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-07-22 16:36:54 +02:00
Simone Bordet e4de4fd189
Re-enabled the documentation module. (#8326)
Re-enabled the documentation module.

Now using ee10 rather than ee9.
Updated sources to reference ee10 implementation classes.
Now -DskipTests will compile the documentation classes but not build the documentation, saving time when building.

Much more work to do to update the documentation for Jetty 12.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-07-22 13:41:09 +02:00
Simone Bordet 8cb09e4c59
Re-enabled jetty-ee9-proxy and jetty-ee10-proxy modules. (#8289)
* Re-enabled jetty-ee9-proxy and jetty-ee10-proxy modules.
Introduced TunnelSupport to abstract out the tunnelling capabilities.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-07-22 13:36:47 +02:00
Lachlan Roberts dde0b4f6c1 re-enable and fix jetty-openid for ee9
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-22 10:16:43 +10:00
Joakim Erdfelt 131fd00285
Jetty-12 : Testing for ResourceHandler / ResourceService (#8327)
* Overhaul of ResourceHandlerTest
* Making ResourceHandlerTest more flexible for testing
  + Each test has it's own docroot
  + Each test decides what it's docroot contents are
* Support QuotedQualityCSV(List<String>)
2022-07-21 15:12:19 -05:00
Joakim Erdfelt 769bd5edd6
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-07-21 06:55:51 -05:00
Joakim Erdfelt 8102378e2d
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2022-07-21 06:55:27 -05:00
Olivier Lamy e3b0e80857
skip test for CodeQL (#8324)
* skip test for CodeQL
* remove javascript and use clean
2022-07-21 06:55:13 -05:00
Joakim Erdfelt e52007cfc6
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-07-21 02:47:57 -05:00
Joakim Erdfelt d9be926b0d
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2022-07-21 02:40:46 -05:00
Joakim Erdfelt cbed42491a
Excluding Stress/Slow tests from normal CI builds. (#8314)
Nightly CI builds still run them.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-07-21 02:40:26 -05:00