Commit Graph

650 Commits

Author SHA1 Message Date
Simone Bordet 6ba81ce10d
Restored parameter-less constructors, as they are useful when used in XML.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-19 11:06:28 +02:00
Lachlan Roberts 3c08931291 cleanups of HttpContent factories
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 17:50:06 +11:00
Lachlan Roberts ad7ae3cfc9 Rename all HttpContent factories
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 17:10:15 +11:00
Lachlan Roberts bbd7ace07e fix failing test cases for ResourceService and Etags
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 09:36:06 +11:00
Joakim Erdfelt ad406ac44c
Cleaning up test cases with eye on work/temp file management 2022-10-18 07:50:44 -05:00
Joakim Erdfelt b10e357902
Use Resource.newReadableByteChannel() instead 2022-10-18 07:50:11 -05:00
Lachlan Roberts cccc16c03e Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-HttpContent-Caching-Refactor 2022-10-18 22:28:13 +11:00
Ludovic Orban b10e25b683 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-10-18 09:30:37 +02:00
Lachlan Roberts fbceb92cd0 further work on CachingContentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-18 15:04:59 +11:00
Joakim Erdfelt 586d0fd097
Merge branch 'jetty-12.0.x' of github.com:eclipse/jetty.project into jetty-12.0.x 2022-10-17 18:32:35 -05:00
Simone Bordet 0d0790834d
Moved FastCGIProxyServlet in ee9 to FastCGIProxyHandler in core. (#8718)
Moved FastCGIProxyServlet in ee9 to FastCGIProxyHandler in core.
Moved TryFilesFilter in ee9 to TryPathsHandler in core.
Update Jetty modules to properly setup the class-path in case of proxy usage.

Fixes Surefire configuration to run the tests.
The problem is that fcgi-proxy depends on fcgi-client, so both will be put on the module-path.
However, fcgi-server is used for the tests, it is in the class-path, but depends on fcgi-client that is on the module-path.
Therefore, when a fcgi-server class tries to access a fcgi-client class, JPMS throws because the fcgi-client module does not export to the unnamed module.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-18 00:00:34 +02:00
Joakim Erdfelt b4e84b75a4
Delay Resource creation in scenarios till actual test case execution 2022-10-17 15:28:41 -05:00
Joakim Erdfelt 6d3bd4e8a1
Minor cleanup of FileSystemResourceTest 2022-10-17 15:25:58 -05:00
Joakim Erdfelt 0e25d98a9d
Handle bad ContextHandler.setBaseResource more clearly 2022-10-17 15:10:55 -05:00
Joakim Erdfelt 3ed1b2b94a
Minor IOTest cleanup 2022-10-17 15:10:18 -05:00
Lachlan Roberts e910a8ea59 work in progress to improve CachingContentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-17 16:07:55 +11:00
Simone Bordet a6f5e1fe8f
Merge pull request #8705 from eclipse/jetty-12.0.x-reenable-customrequestlog
Jetty 12 - Re-enabled RequestLog tests.
2022-10-14 10:30:12 +02:00
Lachlan Roberts 64a5b07424 cache more fields in CachingHttpContent
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-14 15:53:45 +11:00
Joakim Erdfelt 45e706cb67
Move Resource.combine() methods to ResourceFactory 2022-10-13 14:08:21 -05:00
Joakim Erdfelt 83823d8a68
More reliable tests (on windows) 2022-10-13 09:52:31 -05:00
Joakim Erdfelt 8a216c2bb4
Cannot test isContainedIn with null resource 2022-10-13 09:51:02 -05:00
Joakim Erdfelt 454ec0640e
More safety checks on null/empty/blank input params 2022-10-13 09:50:43 -05:00
Joakim Erdfelt 7b15479f3d
Use ResourceFactory managed by ContextHandler 2022-10-13 09:48:34 -05:00
Joakim Erdfelt 30be317df6
import cleanup 2022-10-13 09:48:08 -05:00
Joakim Erdfelt c32fc4972e
Use unwrapContainer instead 2022-10-13 09:47:26 -05:00
Joakim Erdfelt 4ac4b46973
Fix test-keystore order and behavior 2022-10-13 09:46:59 -05:00
Joakim Erdfelt 59f36172e9
Better NPE check on add all resources 2022-10-13 09:18:47 -05:00
Lachlan Roberts 57f71ce77e extract the generation of getCompressedContentFormats to separate contentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-13 18:08:50 +11:00
Lachlan Roberts 2d161bfecd cleanups of HttpContentWrapper and ResourceService
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-13 17:25:47 +11:00
Simone Bordet 01d07569a2
Updates after review.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-12 20:21:58 +02:00
Joakim Erdfelt 5ee1d91ba2 Fixing jetty-util Tests on Windows 2022-10-12 11:46:57 -05:00
Simone Bordet 557696653d
Re-enable RequestLog tests.
Re-implemented features that were commented out.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-12 17:46:49 +02:00
Lachlan Roberts 6771db40bf replace use of CachedContentFactory with CachingContentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-12 19:20:35 +11:00
Lachlan Roberts 6db4bf8aa0 remove getPrecompressedContents from HttpContent and ee9 impl
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-12 18:44:00 +11:00
Lachlan Roberts 81f67f3fff remove getPreCompressedContentFormats from HttpContent
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-12 18:02:34 +11:00
Lachlan Roberts 9f8621269c remove usage of HttpContent.getPreCompressedContentFormats for jetty-core & ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-12 16:16:15 +11:00
Lachlan Roberts 6a6681a2df fix stampede creating CachingHttpContent & remove usage of getPreCompressedContentFormats
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-12 16:11:33 +11:00
Lachlan Roberts a7383ea4de only check file modified time once per second for cached files
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-11 18:41:56 +11:00
Lachlan Roberts 1353f16d57 Refactor for CachingContentFactory and ResourceService
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-11 11:08:42 +11:00
Ludovic Orban 3e78f82c9e Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-10-10 19:21:01 +02:00
Simone Bordet d3d83d0028
Merged PR #7800 to `jetty-12.0.x`.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-10 16:32:26 +02:00
Simone Bordet 4532161b13
Merged PR #7563 to `jetty-12.0.x`.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-10 15:57:52 +02:00
Joakim Erdfelt 73faf92808
Merge pull request #8630 from eclipse/jetty-12-resource-collection-only-dirs
Jetty 12 - Restrict `ResourceCollection` to only hold directory entries
2022-10-10 07:00:23 -05:00
Olivier Lamy b1f8019860
simplify poms, add back missing changes from #7850 and #7687 (#8697)
* simplify poms, add back missing changes from #7850
* remove non used plugin, missing from #7687


Signed-off-by: Olivier Lamy <olamy@apache.org>
2022-10-10 12:52:40 +10:00
Olivier Lamy 1f792d48d0 fix javadoc error in http2 Stream class, enable back building javadoc in Jenkinsfile
Signed-off-by: Olivier Lamy <olamy@apache.org>
2022-10-09 07:59:24 +10:00
Joakim Erdfelt 5c863ccfee
Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12-resource-collection-only-dirs 2022-10-07 13:52:34 -05:00
Simone Bordet c785f08b17
[Jetty 12] Made WebSocket over HTTP/2 work. (#8685)
* Made WebSocket over HTTP/2 work.

Re-enabled tests, and restored HTTP2StreamEndPoint,
as well as implemented getTunnelSupport() for HTTP/2.

Removed from HttpStream methods for upgrade that are
not necessary anymore.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-07 12:50:42 +02:00
Joakim Erdfelt fd8863d196
Merge pull request #8691 from eclipse/fix/jetty-12-octect-typo
Jetty 12 - Fix typo "octect" -> "octet"
2022-10-07 05:21:45 -05:00
Joakim Erdfelt bfadf5e8e7
Issue #7617 - RequestLog content params extraction prevention (#7618) 2022-10-06 13:16:49 -05:00
Joakim Erdfelt 0b05425aa5
Issue #5681 - clearer warning on JVM Arg / System Property use (#7769)
- Improved warning on unrecognized Command Line Options

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-10-06 12:01:37 -05:00
Joakim Erdfelt 660f601f21
Issue #5965 - fixing invalid dot output from start.jar (#7606)
* Adding testcase that can use `dot` if it exists on the machine.
2022-10-06 11:41:50 -05:00
Joakim Erdfelt e6ac065966
Fix typo "octect" -> "octet" 2022-10-06 11:28:12 -05:00
Joakim Erdfelt ad337f1fda
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-10-06 07:32:48 -05:00
Olivier Lamy eb9d07378a
move flatten mojo configuration in top pom, fix boms and remove non needed content (#8686)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2022-10-06 06:50:45 +10:00
Joakim Erdfelt c5c5da63e4
Remove "mixed" content ResourceListingTest methods that mix Directory and non-directory together in a ResourceCollection 2022-10-05 13:03:38 -05:00
Simone Bordet 7ed59f46c8
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-05 12:16:02 +02:00
Lachlan 05a4b96632
Merge pull request #8621 from eclipse/jetty-12.0.x-CachedContentFactory
Fix Caching ContentFactories in Jetty-12
2022-10-04 18:57:29 +11:00
Simone Bordet a3f2268766
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-03 18:28:36 +02:00
Lachlan Roberts 1c9ac9c846 Update javadoc for CachingContentFactory.isCacheable()
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-30 10:34:25 +10:00
Joakim Erdfelt a88f83d4fc
Experiment to see what happens if ResourceCollection can only hold directories 2022-09-29 16:32:23 -05:00
Lachlan Roberts 98f9deed43 remove parent from CachingContentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-29 22:20:00 +10:00
Lachlan Roberts 1508eb61e7 keep the ETag header in ServletContextResponse.resetContent if Response is 304
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-28 10:50:03 +10:00
Joakim Erdfelt 97eedaf9a6
Jetty 12 - Delay Resource Alias calculation until it's requested/needed (#8573)
* Delay Resource alias calculation until it's requested.
* Rename .getAlias() to .getTargetURI()
* PathResource resolveTargetAliasPath to resolveTargetPath
2022-09-27 13:03:47 -05:00
Joakim Erdfelt d73252a28c
Jetty 12 : `ResourceListing` produces XHTML (and is validated in test cases) (#8471)
* Produce XHTML output with tests that validate the XHTML.
* Adding ResourceListingTest and ensuring ResourceListing output is well formed.
* Introduce non-directory entry in ResourceListing test for ResourceCollection
2022-09-27 11:42:05 -05:00
Lachlan Roberts ae071c5a99 release precompressed content buffer in PrecompressedHttpContent & use HttpContent.ContentFactory for parent in CachingContentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-27 22:18:54 +10:00
Simone Bordet 760257a06f
Merge pull request #8620 from eclipse/jetty-12.0.x-completable-with
Introduced [Callback|Promise]Completable.with(Consumer) to simplify u…
2022-09-27 14:18:35 +02:00
Simone Bordet 70e4ccdaa6
Fixes the case where HTTP/2 readData() was returning EOF
that could not be wrapped in a Chunk, because Data.EOF.retain()
throws UnsupportedOperationException.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-27 14:15:42 +02:00
Simone Bordet b5541d9fb8
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-27 12:47:38 +02:00
Lachlan Roberts c58f769117 refactor test for resource lastModified comparisons
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-27 14:15:12 +10:00
Lachlan Roberts c5b4ddee87 Fix ETag header in 304 responses for ResourceService, provide precompressedFormats to DefaultServlet
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-27 12:40:23 +10:00
Lachlan Roberts bed034c22d more fixes for test cases in DefaultServletTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-27 11:01:56 +10:00
Simone Bordet 06be091089
Introduced [Callback|Promise]Completable.with(Consumer) to simplify usage of CompletableFuture APIs.
Updated code to use the new APIs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-26 22:15:17 +02:00
Simone Bordet f8f60822a7
Restored interim responses functionality (100 Continue, 102 Processing, 103 Early Hints) (#8615)
* Restored interim responses functionality (100 Continue, 102 Processing, 103 Early Hints) for core, ee9 and ee10.

Added ProcessingProtocolHandler and EarlyHintsProtocolHandler for the client.

Re-enabled all tests for interim responses for all protocols.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-26 16:48:11 +02:00
Lachlan Roberts c6305ff36c Improvements to CachingContentFactory for Jetty 12
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-26 16:33:50 +10:00
Ludovic Orban fe2bcf9543 #8613: the current quiche-foreign-incubator implementation only works with JDK 17, so disable it on other JDKs
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-09-23 18:26:40 +02:00
Greg Wilkins 2ca6dce08e Merged HotSwapHandler from ee9 to common 2022-09-23 17:21:54 +10:00
Joakim Erdfelt b75896c2f5
Jetty 12 : XmlAppendable use Charset, not String (#8609)
* XmlAppendable use charset, not string
* Collapse Constructors into one
2022-09-22 15:06:02 -05:00
Joakim Erdfelt cde924ec6a
XmlParserTest changed to show simple parse
+ This simple parse should not contain
  references to XSD/DTD in this simple
  state, otherwise it will require internet
  access to perform the test.
2022-09-22 05:52:54 -05:00
Joakim Erdfelt 46bd4cfd9a
Tag tests requiring Online 2022-09-22 05:52:12 -05:00
Simone Bordet d3e16fcff9 Updates from reviews.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-21 20:03:49 +02:00
Simone Bordet 910bb41702 Removed duplicate client transport tests already present in core.
Properly implemented request and response trailers for all the transports, both client and server.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-21 20:03:49 +02:00
Simone Bordet fe34e5390c Reworked HTTP/3 stream and demand implementation so that it now leaves in HTTP3Stream, rather than in HTTP3StreamConnection.
This was necessary to avoid NPE when e.g. calling demand() on a stream that has already been removed from the session.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-21 20:03:49 +02:00
Simone Bordet 854d5cdf6a Renamed ee9 client transport tests package.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-21 20:03:49 +02:00
Simone Bordet 8e68505524 Moving from ee9 to core more client transport tests.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-21 20:03:49 +02:00
Simone Bordet d001d95d9f Moving from ee9 to core the client transport tests that are generic enough to work in core.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-21 20:03:49 +02:00
Joakim Erdfelt 4fe414a762
Jetty 12 : precompressed content support for `ResourceService` (#8595)
* Remove Resource.getWeakETag in favor of new EtagUtils
* Protect bad usages of CachingContentFactory
* Working precompressed content for ResourceService
* Fixing DefaultServlet handling of ResourceService.writeHttpError() overrides
* Protect NPE in CachingContentFactory.isValid()
* Complete callback in DefaultServlet.writeHttpError
* Addressing review comments
* Testing for whole content
* Improve MemoryResource handling of name/filename
* EtagUtils handling of Resource
* Better protection of bad Resource impls in EtagUtils
* Update CachingContentFactory
+ Using Resource.lastModified were possible
+ CachingHttpContent has better Resource
  protection, and uses Etag from delegate
+ CachingHttpContent uses delegate where
  possible.
+ Store Etag HttpField in CachingHttpContent
  and allow override in constructor
* Simpler CachingHttpContent.isValid()
* Better handling of PrecompressedHttpContent

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-09-21 09:39:21 -05:00
Joakim Erdfelt 594e7cfcc1
Improving URIUtil.addPathQuery behavior (#8602)
+ Adding test cases as well.
2022-09-21 05:37:53 -05:00
Lachlan 97dd7b30d2
Merge pull request #8413 from eclipse/jetty-12.0.x-websocket-upgrade-contract
Jetty 12 : Strengthen WebSocket upgrade contract and other improvements
2022-09-21 18:14:27 +10:00
Joakim Erdfelt 95bf791b71
Jetty 12 - Improve FileID and use where appropriate (#8589)
* Use FileID where appropriate
* Adding FileID.matchesExtension
* Fixing demo modules start test
2022-09-20 09:35:50 -05:00
Lachlan Roberts 5296424e0a Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-websocket-upgrade-contract 2022-09-19 18:34:49 +10:00
Lachlan Roberts b9d980b5a9 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-09-19 16:39:26 +10:00
Joakim Erdfelt 8e98467c39
Cleanup tests in jetty-util Resource (#8586)
+ No more @Disabled tests
+ Merge JrtResourceTest into ResourceTest
+ Merge ClassPathResourceTest into ResourceTest
+ Rename JarResourceTest to MountedPathResourceTest
2022-09-15 07:40:05 -05:00
Simone Bordet 0d8af24b6b
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-15 11:00:03 +02:00
Joakim Erdfelt 9668d614d9
Issue #8474 - Jetty 12 - `Resource.list()` API change + `Resource.getFileName()` addition (#8582)
* Issue #8474 - Resource.list and Resource.getFileName work
* Correcting signature of Resource.list and use it
* Introduce Resource.getFileName and use it
* Adding URIUtil.addPath() test to show file+str behavior

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-09-14 15:48:01 -05:00
Joakim Erdfelt 045af3d9ed
Updating core server RequestTest for added URI.path 2022-09-13 11:37:59 -05:00
Joakim Erdfelt 141c58208d
Merge branch 'jetty-11.0.x' into jetty-12.0.x 2022-09-13 10:11:40 -05:00
Joakim Erdfelt 0d2bfddf7f
Use normal git, not jgit (as it's incompatible with newer git clones) 2022-09-13 09:53:23 -05:00
Joakim Erdfelt efddb23969
Add testcase showing URIUtil.addPath() behavior 2022-09-08 12:56:18 -05:00
Olivier Lamy eb37aa0588 Merge branch 'jetty-11.0.x' into jetty-12.0.x 2022-09-08 12:47:38 +10:00
Lachlan Roberts 5d0f781cb7 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-websocket-upgrade-contract 2022-09-08 10:43:26 +10:00
Lachlan 860554b71b
Merge pull request #8547 from eclipse/jetty-12.0.x-disabledTestFixes
re-enabling and fixing some tests for Jetty-12
2022-09-08 10:27:10 +10:00
Lachlan 5ccd0d7fc4
Merge pull request #8548 from eclipse/jetty-12.0.x-ee10-statisticsServlet
Fix the StatisticsServlet for Jetty-12 EE10
2022-09-08 10:24:44 +10:00
Joakim Erdfelt c1b8ee40d8
Better evaluation 2022-09-07 07:08:35 -05:00
Joakim Erdfelt 84c6f30dfd
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/jetty-12-pathresource-alias-detection-in-jarfile 2022-09-07 05:52:41 -05:00
Joakim Erdfelt 0d09875a22
Fixing checkstyle issue 2022-09-06 20:09:45 -05:00
Joakim Erdfelt 6fa9f4a159
Minor Alias cleanup. 2022-09-06 20:03:48 -05:00
Joakim Erdfelt ff35c0e5ef
Updating from review comments. 2022-09-06 19:44:41 -05:00
Joakim Erdfelt 54cc1a3ff9
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/jetty-12-pathresource-alias-detection-in-jarfile 2022-09-06 19:36:53 -05:00
Joakim Erdfelt 227c5a8887
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/jetty-12-resource-1-lastmodified-to-instant 2022-09-06 18:49:36 -05:00
Joakim Erdfelt 8c7199c586
Fix for java.lang.UnsupportedOperationException: newFileChannel
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-09-06 18:47:41 -05:00
Joakim Erdfelt 156f57c9a0
Compartor chain instead 2022-09-06 17:07:40 -05:00
Joakim Erdfelt be3ea8275b
Fix testcase assumption 2022-09-06 16:59:07 -05:00
Joakim Erdfelt a24512f916
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/jetty-12-resource-1-lastmodified-to-instant 2022-09-06 16:45:48 -05:00
Joakim Erdfelt eeb7264f1f
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/jetty-12-resource-2-iterable 2022-09-06 16:42:26 -05:00
Joakim Erdfelt 0ff3a5c2b5
Merge pull request #8552 from eclipse/fix/jetty-12-resource-4-remove-ismemorymappable
Issue #8474 - Jetty 12 - Eliminate `Resource.isMemoryMappable`
2022-09-06 16:38:46 -05:00
Joakim Erdfelt 1cd0ac4959
Changes from review 2022-09-06 15:12:32 -05:00
Joakim Erdfelt c122c99163
lastAccessed is now an Instant 2022-09-06 15:09:44 -05:00
Joakim Erdfelt 226b9594f1
Using other method 2022-09-06 15:09:33 -05:00
Joakim Erdfelt 7c694c49f2
Fix Formatter in ResourceListing 2022-09-06 15:05:25 -05:00
Joakim Erdfelt 490827db9e
Simpler impl 2022-09-06 14:53:44 -05:00
Joakim Erdfelt 2f96ab8678
checkstyle 2022-09-06 14:53:34 -05:00
Joakim Erdfelt 02b03b1058
Using variable 2022-09-06 14:51:26 -05:00
Joakim Erdfelt 7156139fb5
Modernizing equals/hashcode 2022-09-06 14:50:21 -05:00
Joakim Erdfelt 7de309698c
Eliminate Resource.isSame 2022-09-06 14:10:15 -05:00
Joakim Erdfelt 9a553e1787
Eliminate Resource.isMemoryMappable 2022-09-06 13:54:50 -05:00
Joakim Erdfelt 91b22afd30
Simpler test case 2022-09-06 13:47:01 -05:00
Joakim Erdfelt 2f26c86ccc
Introduce Iterable<Resource> to base Resource 2022-09-06 13:46:03 -05:00
Joakim Erdfelt 7f88878df9
Change signature of Resource.lastModified()
+ Now returns Instant
2022-09-06 13:21:25 -05:00
Simone Bordet 8953873e67
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-06 12:31:54 +02:00
Lachlan Roberts 2d63071e73 Fix the StatisticsServlet for Jetty-12 EE10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-06 18:28:04 +10:00
Lachlan Roberts 22bec1976c Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-disabledTestFixes 2022-09-06 17:56:43 +10:00
MoonLord-LM bc6d19f100
Issue #8540, add classifier for jetty-12.0.x (#8542) 2022-09-03 19:38:26 +10:00
Ludovic Orban 314c802e03 Removed deprecated methods
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-09-02 18:14:48 +02:00
Olivier Lamy d11b5e0742
add module configuration for demo handler (#8490)
* add module configuration for demo handler

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-09-02 17:46:38 +10:00
Ludovic Orban bb83e835cf Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-09-02 09:12:24 +02:00
Lachlan Roberts 984f50bd22 Fix failures in FormTest by fixing bugs in FormFields
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-01 15:51:12 +10:00
Lachlan Roberts eb5f765bee Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-08-24 16:43:59 +10:00
Simone Bordet a3ba86266a
Implemented ProxyHandler in new module jetty-core/jetty-proxy. (#8475)
Moved ConnectHandler to org.eclipse.jetty.server.handler, where it should have been from the start.

Cleaned up and corrected behavior of SecureRequestCustomizer.
Now the response is wrapped with isSecure=true if it arrived over a secure transport.
The request URI scheme indicates whether the request is secure towards the origin server.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-19 09:38:34 +02:00
Olivier Lamy 1a9d5e047b
add missing systemId in catalog (#8477)
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-19 16:06:08 +10:00
Lachlan Roberts b54a7e94d4 well-known handler should use its own ResourceFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-18 19:05:05 +10:00
Olivier Lamy 79c5f7153a fix merge
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-18 18:25:12 +10:00
Lachlan Roberts 1c2290dca7 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-08-17 22:01:57 +10:00
Lachlan Roberts 206a899629 PR #8413 - add javadoc to Handshaker.isWebSocketUpgradeRequest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-17 16:53:39 +10:00
Lachlan Roberts 82618073d5 PR #8413 - move wrapped req/resp attributes into WebSocketConstants
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-17 16:41:23 +10:00
Lachlan Roberts 9f92b6b7be PR #8413 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-17 16:34:48 +10:00
Lachlan Roberts 87f2393467 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-websocket-upgrade-contract 2022-08-17 16:00:39 +10:00
Lachlan Roberts bf83e55999 keep CreatorNegotiator internal
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-17 15:54:09 +10:00
Joakim Erdfelt dce2da81da
Rename PathResource.normalize(Path) to toUri(Path) 2022-08-16 21:14:51 -05:00
Joakim Erdfelt 98bced27c4
Adding "#" and "%23" to ensureSafeEncoding(String) due to Paths.get(URI) issue. 2022-08-16 19:26:13 -05:00
Joakim Erdfelt 6191377504
Proper "?" vs "%3F" handling 2022-08-16 16:31:42 -05:00
Joakim Erdfelt 5ef2ef5684
URIUtil.addPath() more testing and documentation 2022-08-16 16:21:24 -05:00
Joakim Erdfelt 1cb77e82fa
Fix URIUtilTest 2022-08-16 15:48:55 -05:00
Joakim Erdfelt a40002fb11
Revert ServletPathSpecOrderTest 2022-08-16 15:47:42 -05:00
Joakim Erdfelt db79ca7a1a
Shortcut in PathResource.checkAliasPath() 2022-08-16 11:49:35 -05:00
Joakim Erdfelt 90dd76c11c
Adding TODOs 2022-08-16 11:49:03 -05:00
Joakim Erdfelt 8147ece3ec
Make URIUtil.equalsIgnoreEncodings(String,String) work with bi-directional comparison 2022-08-16 10:08:09 -05:00
Joakim Erdfelt ded11be439
Update javadoc 2022-08-16 07:04:02 -05:00
Joakim Erdfelt a3de885403
More URIUtil.equalsIgnoreEncodings(URI, URI) tests 2022-08-15 19:13:03 -05:00
Joakim Erdfelt 8ef7c2982c
Javadoc 2022-08-15 19:00:14 -05:00
Joakim Erdfelt 60ab067144
URIUtil.equalsIgnoreEncodings(URI, URI) fix 2022-08-15 18:54:40 -05:00
Joakim Erdfelt d16b1cd595
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/jetty-12-pathresource-alias-detection-in-jarfile 2022-08-15 18:39:21 -05:00
Joakim Erdfelt 351f80f2c9
Disabling test to work in on in PR 2022-08-15 18:03:27 -05:00
Simone Bordet b5332c38a9 Implemented ranged requests and responses.
Refactored MultiPart so that the different behavior between
multipart/form-data and multipart/byteranges is captured in the code.

Renamed MultiParts to MultiPartFormData, and ServletMultiParts to ServletMultiPartFormData.

Introduced MultiPartByteRanges and used it to implement ranges in ResourceService.
Re-enabled multipart tests for ranges that were disabled, and added more.

Modernized and simplified implementation of ByteRange.
Updated ByteRangeTest.

Removed RangeWriter and its subclasses and their tests, as they are not used anymore.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-15 17:32:02 +02:00
Simone Bordet 2e01ed7e08 Renamed InclusiveByteRange to just ByteRange.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-15 17:32:02 +02:00
Simone Bordet 24b6ae0fb7 Moved InclusiveByteRange and InclusiveByteRangeTest to jetty-http.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-15 17:32:02 +02:00
Simone Bordet 6ac7160a6d
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-15 17:19:51 +02:00
Lachlan Roberts 03a04f6af4 Issue #8456 - fix merge for ResourceService
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-15 20:35:57 +10:00
Lachlan Roberts f19577c197 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-8426-aliaschecker-review 2022-08-15 17:05:58 +10:00
Lachlan Roberts 2c42c0de83 Issue #8456 - serve jetty-dir.css as resource in ee10 ResourceService
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-15 15:33:28 +10:00
Greg Wilkins 6fa0aadd8f TODOs on resource 2022-08-15 14:14:56 +10:00
Greg Wilkins edba0c36c7 Work around for #8462 ee10 handling of %2F
This is a provisional workaround for #8462 that fixes the bugs in URIUtil that were preventing encoded %2F being seen as an alias.

However, the better ultimate fix would be to see an encoded request as a request for a path segment that includes %2F.
2022-08-15 13:58:29 +10:00
Lachlan Roberts ffc14a80b9 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-8426-aliaschecker-review 2022-08-15 13:16:51 +10:00
Greg Wilkins af5fecd18d
Jetty 12 : Rename resourceBase to baseResource (#8310)
* rename to baseResource
2022-08-15 12:24:13 +10:00
Lachlan Roberts a6b88cfead fix failures in ResourceHandlerTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-15 11:00:25 +10:00
Greg Wilkins e0a9c21615 Support for directory listing of ResourceCollections
This is a counter to #8427 to show that Resource.listing is still needed
2022-08-15 10:54:20 +10:00
Lachlan Roberts d738f4b99f Update javadoc for the AliasCheck interface
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-15 10:46:48 +10:00
Lachlan Roberts 8e172f311e Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-8426-aliaschecker-review 2022-08-15 10:40:59 +10:00
Simone Bordet 601cba0b18
Fixed javadocs.
Javadoc generation for the jetty-quic-quiche-* modules may need
to use a <profile> since the APIs used depend on the Java version.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-13 17:45:26 +02:00
Simone Bordet 21fce4ffb9
Pool and ConnectionPool code cleanups
Code cleanup, removing deprecations, for class Pool,
ConnectionPool and its implementations.

Removed DuplexHttpDestination and MultiplexHttpDestination.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-13 10:01:36 +02:00
Simone Bordet 6f0f8854de
Merged branch 'jetty-12.0.x' into 'jetty-12.0.x-module-renaming'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-12 17:31:01 +02:00
Simone Bordet 0915492a7b
Jetty 12 module renaming - demos.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-12 10:12:39 +02:00
Olivier Lamy 44a37746e6
Jetty 12 : reactivate `jetty-ee9-demo-embedded` and `jetty-ee9-demo-proxy-webapp` and add more (#8419)
* ee8 demos to use ee9 demos resources
* add jetty-ee8-demo-jaas-webapp
* add jetty-ee8-demo-jndi-webapp jetty-ee8-demo-mock-resources
* uhm jetty-ee8-demo-jetty-webapp have some issues
* fix jetty-ee8-demo-jetty-webapp
* fix some jetty-ee9-demo-embedded and add back jetty-ee8-demo-proxy-webapp
* demo-embedded need to have jetty-ee9-demo-jsp-webapp built first
* fixing more demos modules. Activate dist test for demo modules and all env


Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-12 17:52:53 +10:00
Simone Bordet 1eea480764
Jetty 12 module renaming - jetty-websocket.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-12 09:33:31 +02:00
Simone Bordet be2d4ef069
Jetty 12 module renaming - jetty-quic.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-12 09:33:31 +02:00
Simone Bordet 122b095260
Jetty 12 module renaming - jetty-http3.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-12 09:33:31 +02:00
Simone Bordet 7d264e6024
Jetty 12 module renaming - jetty-http2.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-12 09:33:31 +02:00
Simone Bordet 11c3642892
Jetty 12 module renaming - jetty-fcgi.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-12 09:33:31 +02:00
Greg Wilkins 36f0e5f785 fixed
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2022-08-12 17:28:33 +10:00
Greg Wilkins e249d39427
MemoryResource (#8451)
Added MemoryResource to simplify favicon and similar handling
2022-08-12 10:36:23 +10:00
Greg Wilkins fac047905a suppress stack
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2022-08-12 08:31:49 +10:00
Ludovic Orban 08f344e7f6 add TODOs for Resource.combine
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-11 12:03:13 +02:00
Greg Wilkins 20bab8a471 Fix build 2022-08-11 16:34:10 +10:00
Greg Wilkins 8f8101ba81 fix #8448 warning on 304
Improved logging
2022-08-11 16:12:24 +10:00
Lachlan Roberts 4c599c94cd fix licence header in AliasCheck
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-11 14:03:18 +10:00
Greg Wilkins 9833be0374 WIP #8441 isNotNormalWithinSelf
oops
2022-08-11 13:32:01 +10:00
Greg Wilkins fcdb8305de WIP #8441 isNotNormalWithinSelf
Added method to be optimized later
2022-08-11 12:52:19 +10:00
Lachlan Roberts 941527e27f make alias checking in ee10 use core alias checkers
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-11 11:52:27 +10:00
Greg Wilkins a0d6f42e73 Fix #8442 server propagation
Test setServer propagation
protect from inadvertent null setting
2022-08-11 09:05:12 +10:00
Joakim Erdfelt d1c6c68bac
Adding TODO for URIUtil.canonicalPath() 2022-08-10 17:18:13 -05:00
Joakim Erdfelt 842af3ed22
Avoid recreating `Resource` during container/jar pattern filtering in `MetaInfConfiguration`
* Delete PatternMatcher.java
2022-08-10 16:12:15 -05:00
Joakim Erdfelt eb2bf4b97d
ServletPathSpec encoded test case 2022-08-10 15:52:11 -05:00
Joakim Erdfelt 7808a26beb
Proper URIUtil.canonicalPath conversion of 8-bit characters 2022-08-10 15:30:11 -05:00
Joakim Erdfelt 15cf8d1539
Removed pointless Integer.toString() call. 2022-08-10 15:27:45 -05:00
Joakim Erdfelt c2ced95eb1
Fixing 8-bit decoding bugs 2022-08-10 14:36:09 -05:00
Joakim Erdfelt 505baf4a4c
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/jetty-12-pathresource-alias-detection-in-jarfile 2022-08-10 13:03:37 -05:00
Joakim Erdfelt 3b690fdefd
Adding in-code comments about Handler.setServer(Server) 2022-08-10 13:01:08 -05:00
Joakim Erdfelt e6a2592aee
Fixing test cases 2022-08-10 12:09:49 -05:00
Joakim Erdfelt a0d9507ca5
Add TODO about DefaultHandler and setServer bug 2022-08-10 12:07:26 -05:00
Simone Bordet af77a53e39
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-10 16:51:35 +02:00
Jan Bartel 42f72268cf
Jetty 12 : #8408 Support new `<cookie-config>` concepts in Servlet 6 (#8420)
* Issue #8408 Implement new session cookie attributes
2022-08-10 16:33:08 +10:00
Greg Wilkins 408de26ec2 Created core-demo and updated demo root
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2022-08-10 12:04:39 +10:00
Joakim Erdfelt 5c5b02d136
Changes from review 2022-08-09 19:44:13 -05:00
Joakim Erdfelt 342cef30cc
Remove IOException javadoc 2022-08-09 19:03:27 -05:00
Joakim Erdfelt 3bed1d2587
Alternative approach for PathResource without zipfs specifics 2022-08-09 19:00:02 -05:00
Joakim Erdfelt 537e35926a
Testing updates
+ Closing ResourceFactory where appropriate
+ new internal to zipfs Symlink test
2022-08-09 18:49:17 -05:00
Joakim Erdfelt 303f74c753
Adding comments in code about zipfs behaviors 2022-08-09 18:30:03 -05:00
Joakim Erdfelt ff09545beb
More tests for PathResource.isAlias with `jar:file:` based content 2022-08-09 18:23:58 -05:00
Joakim Erdfelt f7b8ed4c06
Rework PathResource.checkAliasPath to handle `jar:file:` paths more elegantly. 2022-08-09 10:54:54 -05:00
Joakim Erdfelt 199a9cd2ad
Jetty 12 : XML namespace cleanup (#8406)
* Adding Servlet 6 XML Entities
* Fixing bad xsi:schemaLocation entries
* Update all jetty-ee10 web XMLs to JakartaEE version 6.0 based
* Using XML Catalog
* Introducing catalogs for:
   - default XML xsd/dtd (catalog-org.w3.xml)
   - Configure dtd (catalog-configure.xml)
   - EE10 Servlet 6 xsd/dtd (catalog-ee10.xml)
   - EE9 Servlet 5 xsd/dtd (catalog-ee9.xml)
   - EE8 Servlet 4 xsd/dtd (catalog-ee8.xml)
* New XmlParser.addCatalog(URI catalogXml, Class<?> classBase)
   to allow the loading of a catalog which has it's resources
   referenced via the classBase.getResource(name)
* WebDescriptor uses Environment to load appropriate catalog.
* Remove XmlParser.redirectEntity(String, String)
2022-08-09 06:34:29 -05:00
Joakim Erdfelt e7e570f4bb
Invert merge hack from @Lachlan to return true on symbolic link 2022-08-08 11:41:11 -05:00
Ludovic Orban 871f1f8b4d Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-08 10:36:37 +02:00
Lachlan Roberts 19e2e7babc Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-08-08 16:15:53 +10:00
Lachlan Roberts c5f5bb9bba switch ordering of checks in RFC6455Handshaker.isWebSocketUpgradeRequest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-08 15:31:58 +10:00
Joakim Erdfelt 21546e390c
Jetty 12 : Simplify `AnnotationParser` scanning for class files (#8404)
* Improved FileID.isHidden
* Simplified AnnotationParser
  + Not using MultiReleaseJarFile
  + Walk of a Directory or a JAR is the same
  + Reduced parse method count
  + Fixed TestAnnotationParser
     Using proper fully qualified classnames now (were not yet converted over to jetty-12 naming)
* Single parseClass method
* Single parseDir method
* Adapting ee9 AnnotationParser to have the same behaviors as ee10.
* Deleting TestAnnotationInheritance tests
  + We don't want the AnnotationParser
    creating new Resource objects for Class.getSuperClass()
    resources that don't belong to
    the same Resource that the passed
    in class belongs to (as this is out of
    scope for the Mount management).

    Imagine if told to parse ClassB
    which extends from ClassFoo, which
    is in a different JAR than ClassB?

    This concept from Jetty 9/10/11
    was only used in testcases and not
    in live runtime code, so it was
    removed.

Co-authored-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-05 15:42:27 -05:00
Joakim Erdfelt fe21198499
Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-rework-resource-factory 2022-08-05 11:11:39 -05:00
Olivier Lamy d93ca33de9 fix it work
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-05 21:55:34 +10:00
Joakim Erdfelt 3d60b558bf
Adding TODO about odd .setServer(Server) behavior 2022-08-04 14:45:14 -05:00
Joakim Erdfelt 05929ffe57
Move Favicon init to .setServer(Server) 2022-08-04 13:10:41 -05:00
Joakim Erdfelt 19039f4df8
Remove maxBuffer from ContentFactory.getContent(String) (#8403) 2022-08-04 17:32:50 +02:00
Simone Bordet 90fc840f43
Jetty 12 : Renamed FutureFormFields to just FormFields, as it is mostly used (#8411)
Renamed FutureFormFields to just FormFields, as it is mostly used
as a CompletableFuture, and the "Future" prefix is soo Java 5 :)

Improved releasing of chunks in FormFields implementation.

Improved configuration of FormFields for max number of fields and max form content length.

Fixed Field.toString().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-04 17:18:13 +02:00
Lachlan e086cab807
Fixes #8211 - fix ISE from HttpChannelState if failure during process (#8215)
Now all the logic for completion is in lockedOnComplete().

Avoid throwing in ChannelCallback.succeeded() if HttpChannelState._error != null.
This is necessary because HttpChannelState._error may be set asynchronously by
some event such as HTTP/2 reset streams or idle timeouts, but if there is a
thread dispatched to the application the asynchronous event will not fail the
callback, as the failure may be noticed by the application (e.g. via a read() call).

Fixed TrailersTest.testHandlerRequestTrailers() by avoid reading again after
having read the trailers.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-04 17:06:32 +02:00
Simone Bordet c077bbecaa
Jetty 12.0.x MultiPart (#8201)
Moved multipart test files to jetty-http.

Introduced jetty-http `MultiPart` class and made `MultiPart.Parser` non-blocking and lenient on newlines.
Made `MultiPartCaptureTest` to pass.

Moved o.e.j.server.MultiPartParserTest tests to o.e.j.http.MultiPartTest.

Renamed MultiPartFormInputStreamTest to MultiPartsTest.

Introduced class o.e.j.server.MultiParts, a CompletableFuture of Parts
that can be used asynchronously in Handlers and in general in core Jetty.

Implemented multi-part handling in ee10.

Implemented DelayedHandler.UntilMultiPart.

Introduced MultiPart.ContentSource as the multipart "generator".

Replaced ByteBuffer/boolean pair with Chunk and implement Chunk slicing & improve retainability for MultiPart parser.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2022-08-04 17:03:40 +02:00
Joakim Erdfelt d97ab506f7
Improved version based on review 2022-08-04 09:15:13 -05:00
Joakim Erdfelt 1f1b9dc2dc
Better handling of jetty-dir.css and favicon.ico 2022-08-04 08:37:56 -05:00
Joakim Erdfelt 74f54da67e
Adding FileSystemPool.Listener support 2022-08-04 07:38:29 -05:00
Ludovic Orban ecd2cabfa2 fix test
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-04 12:56:27 +02:00
Lachlan Roberts d0a731f84f fix websocket-core WebSocketProxyTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-04 20:46:58 +10:00
Lachlan Roberts f67f605acb update javadoc and fix ee9 implementations
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-04 18:58:58 +10:00
Lachlan Roberts 43d4e47056 Simplify Core API by making WebSocketNegotiation internal
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-04 13:42:39 +10:00
Lachlan Roberts 297e717ca1 improve javadoc to strengthen contract for websocket upgrade
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-04 11:23:54 +10:00
Lachlan Roberts a8cf747754 extract isWebSocketUpgradeRequest into Handshaker interface
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-04 10:16:39 +10:00
Ludovic Orban 341adb4b62 tentatively fixing mount leaks
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 20:45:47 +02:00
Ludovic Orban ae56240423 restore getAlias
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 18:37:19 +02:00
Ludovic Orban a1e08ec56e improve javadoc
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 18:10:22 +02:00
Ludovic Orban 7a28563bcc move toURI to URIUtil
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 17:04:22 +02:00
Ludovic Orban 50c19d317b Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-rework-resource-factory 2022-08-03 17:00:24 +02:00
Ludovic Orban 5ca51c97ad hide ResourceFactory internals and cleanup Mount leftovers
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 16:59:02 +02:00
Ludovic Orban 7df3da2af8 handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 16:30:02 +02:00
Ludovic Orban 2459e7a2cc fix compilation errors
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 14:12:23 +02:00
Joakim Erdfelt 6ce295ce7a
Remove static Resources.isContainedIn API 2022-08-03 06:59:17 -05:00