Commit Graph

194 Commits

Author SHA1 Message Date
Joakim Erdfelt 84f6dc7f4c
Review of Resource throwables 2022-08-01 21:48:08 -05:00
Joakim Erdfelt e1ebef2ca6
Changing contract of Resource.resolve(String)
No longer throws IOException
2022-08-01 21:48:07 -05:00
Joakim Erdfelt e6be9fb14c
Updates from review 2022-08-01 21:48:07 -05:00
Joakim Erdfelt 98fa52ef30
Updating FileID.isTld(Path) 2022-08-01 21:48:07 -05:00
Joakim Erdfelt dd7dda2c53
Move FileID from deploy to util
+ Move static methods from other
  places to FileID or URIUtil
  - MultiReleaseJarFile
  - Resource
  - MetaInfConfiguration
+ Improve testing of URIUtil and FileID
2022-08-01 21:48:00 -05:00
Joakim Erdfelt caff1b036b
Jetty 12 - Cleanup MultiReleaseJarFile to use newFileSystem behaviors built into JVM (#8328)
* Cleanup MultiReleaseJarFile to use newFileSystem behaviors built into JVM
* Adding more testing to MultiReleaseJarFile
* Updating AnnotationParser and MetaInfConfiguration
* Created URIUtil.streamOf(URLClassLoader) to aid
  in proper conversion of URLClassLoader.toURLs to URIs
* Introduce URIUtil.fixBadJavaIoFileUrl
  Addresses bad java.io.File.toURL().toURI() issues
  file:/path to file:///path
* Better URI pool/key behaviors in FileSystemPool
* no arg AnnotationParser uses ASM_VERSION
2022-07-29 10:08:32 -05:00
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 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
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
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
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
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 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 ba4405e05b
Comment/TODO updates for Jetty 12.0.x from review with @gregw 2022-07-24 21:31:30 -05: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
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
Lachlan Roberts fe4ce1443b merge openid changes to ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-20 15:11:02 +10:00
Joakim Erdfelt e84b84e09c
Have jetty-ee#-maven-plugin manage the deployer environment as well 2022-07-19 11:46:20 -05:00
Joakim Erdfelt 76d7bf7c7a
NYI: ServletContextRequest.ServletApiRequest.newPushBuilder 2022-07-18 13:44:36 -05:00
Joakim Erdfelt 7fb119bb32
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-07-18 12:50:16 -05:00
Joakim Erdfelt fcc443088f
More work cleaning up DefaultServletTest
+ fixed DefaultServletTest.testOutputStreamAndCharsetFiltered
+ fixed DefaultServletTest.testWriterAndCharsetFiltered
2022-07-15 13:17:11 -05:00
Joakim Erdfelt 1ff98c3d2b
Disabled currently broken DispatcherTest.testForwardSendError 2022-07-15 11:24:34 -05:00
Joakim Erdfelt 2a2e252de9
Cleanup existing DispatcherTest (before fixing disabled tests) 2022-07-15 10:57:18 -05:00
Joakim Erdfelt 60b618d71d
Remove errorClose -> softClose temporarily as it breaks too much. 2022-07-15 08:30:06 -05:00
Joakim Erdfelt 07dd27c251
Merge branch 'jetty-12.0.x' of github.com:eclipse/jetty.project into jetty-12.0.x 2022-07-14 20:33:36 -05:00
Joakim Erdfelt 9b5d4ce8e2
More DefaultServletTest additions 2022-07-14 18:38:21 -05:00
Greg Wilkins fc6a92f426 More work on the demos 2022-07-15 09:18:52 +10:00
Joakim Erdfelt 4ae4d01549
Enable more DefaultServletTest methods 2022-07-14 16:19:24 -05:00
Joakim Erdfelt 0dc65e5588
Fixing DefaultServlet Alias Checking
+ Fixing DefaultServletTest.testSymLinks
2022-07-14 16:17:12 -05:00