Commit Graph

504 Commits

Author SHA1 Message Date
Lachlan d72e39757d
Merge pull request #8767 from eclipse/jetty-12.0.x-HttpContent-Caching-Refactor
Refactor and improvements to HttpContent Factories
2022-11-16 12:42:32 +11:00
Jan Bartel 862af89c55
Issue #8744 Update ee10 to jasper 10.1.1 (#8746) 2022-11-15 14:10:27 +11:00
Joakim Erdfelt cf0c4a2b07
Move GzipDefaultServletTest to jetty-core/jetty-server tests 2022-11-10 15:25:22 -06:00
Joakim Erdfelt 9640d0470a
Fix compilation 2022-11-10 14:31:09 -06:00
Joakim Erdfelt d7cc13d972
Merge branch 'jetty-12-more-test-tags' into jetty-12.0.x 2022-11-10 13:24:27 -06:00
Joakim Erdfelt 704442b670
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-11-10 11:55:28 -06:00
Joakim Erdfelt a636a7d153
Adding some more test tags 2022-11-10 10:14:58 -06:00
Lachlan Roberts bff3c83726 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-11-10 17:38:46 +11:00
Lachlan Roberts 3c9b912dc6 Issue #8330 - port openid changes to ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-11-10 17:07:11 +11:00
Lachlan Roberts eeb4df9965 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-HttpContent-Caching-Refactor 2022-11-10 16:20:30 +11:00
Lachlan Roberts 1c6d36e44a changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-11-10 16:16:51 +11:00
Joakim Erdfelt 27abda6299
Issue #8877 - disabling hazelcast testing until k8s issue can be solved (in a branch) 2022-11-09 11:59:16 -06:00
Joakim Erdfelt a34e45a09e
Issue #8877 - disabling hazelcast testing until k8s issue can be solved (in a branch) 2022-11-09 11:58:46 -06:00
Joakim Erdfelt 08c47f5f57
Jetty 12 - use JVM provided null OutputStream (#8789)
* Remove IO.getNull* methods and use JVM versions

+ This also honors the open/close/error on
  bad use of the streams/writers
2022-11-09 07:06:43 -06:00
Simone Bordet e2e4d256e7
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-11-09 12:23:27 +01:00
Lachlan Roberts a4e773a7ab changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-11-09 14:10:49 +11:00
Lachlan Roberts 75f210d20b Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-HttpContent-Caching-Refactor 2022-11-08 21:22:53 +11:00
Joakim Erdfelt b3505ae687
Jetty 12 - General cleanup of URIUtil (#8861)
+ Removal of __CHARSET
+ Removal of unused methods
+ Using new switch/case concepts
+ cleanup of URIUtil constants
+ cleanup of URIUtil methods
+ collapse separate methods
+ simplify encodePath()
* Javadoc updates
* equalsIgnoreEncoding cleanup (no longer used by Resource layer)
2022-11-04 14:28:53 -05:00
Lachlan Roberts c0bb0272f7 fix release in CachingHttpContentFactory and always use ByteBufferPool
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-11-03 17:38:22 +11:00
Lachlan Roberts 6facedba75 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-HttpContent-Caching-Refactor 2022-11-02 17:28:42 +11:00
Lachlan Roberts e28a528165 changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-11-02 17:21:44 +11:00
Greg Wilkins 976ab3df8d
ResourceCollection should not have a path (#8711)
ResourceCollection should not have a path
Nor name, nor filename unless all resources agree on it.
revert combine and related methods to return Resource and not explicitly a ResourceCollection, as if there is only 1, then a collection is not needed
cleanup ResourceCollection creation. Avoid sanity checks on resolved resources.
2022-11-01 15:54:50 +11:00
Joakim Erdfelt 47d2b062f0
Jetty 12 - Fix demo-ee10 `LikeJettyXml` (and testcase) (#8771)
* Remove DebugBinding config (doesn't exist anymore)

* Make LikeJettyXml work (and test)
2022-10-31 11:57:05 -05:00
Simone Bordet 3e9bebd05a
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-28 16:20:17 +02:00
Simone Bordet cf366b3323
Improved javadocs.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-25 15:42:49 +02:00
Greg Wilkins 3b2d4048fd replaced getPathInContext with static method
updates from review
2022-10-25 21:11:10 +11:00
Greg Wilkins 9dc9eaa711 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12-static-pathInContext 2022-10-25 20:42:25 +11:00
Gili Tzabari 0724d1090d
Fixes #8723: Provide a thread-safe way to modify HttpClient proxies at runtime. 2022-10-25 10:23:04 +02:00
Lachlan Roberts 7752720861 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-HttpContent-Caching-Refactor 2022-10-25 16:44:53 +11:00
Lachlan Roberts 02e0a3993c cannot add ContentFactory to servletContext attribute as there may be multiple factories in a single context
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-25 16:39:42 +11:00
Greg Wilkins 6c9d34c26a Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12-static-pathInContext
# Conflicts:
#	jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/DefaultServlet.java
2022-10-25 09:11:40 +11:00
Simone Bordet 660093ff3a
Code cleanups.
Removed obsolete oej.server.HttpTransport.
Cleaned up ConnectionMetaData.Wrapper.
Simplified ee10 DefaultServlet.ServletCoreRequest.
Other minor cleanups.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-24 16:25:53 +02:00
Greg Wilkins 14d912c654 replaced getPathInContext with static method 2022-10-24 21:02:18 +11:00
Greg Wilkins 30401d8cf8 WIP replacing getPathInContext with static method 2022-10-24 11:26:50 +11:00
Greg Wilkins 1885df7e03 WIP replacing getPathInContext with static method 2022-10-23 22:36:15 +11:00
Ludovic Orban 38289e46d4
Make Client's Request and Response `abort()` fully async (#8725)
Changed Request and Response abort() to be fully async by returning a CompletableFuture<Boolean>

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-10-21 15:32:46 +02:00
Lachlan 30138e9d03
Merge pull request #8742 from eclipse/jetty-12.0.x-websocket-disabled-tests
Re-enable and fix websocket tests for Jetty 12 ee9 and ee10
2022-10-21 13:08:55 +11:00
Greg Wilkins ac6abb307d
ResourceHandler set base resource as string (#8735)
* ResourceHandler set base resource as string

* ResourceCollection should not have a path

fixed tests
2022-10-21 09:32:54 +11:00
Lachlan Roberts 0e1bae4059 use RetainableByteBuffer for getBuffer in HttpContent
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-20 21:29:55 +11:00
Lachlan Roberts 8768725de9 separate evicting logic from CachingHttpContentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-20 10:37:38 +11:00
Lachlan Roberts 86da43a54a improve configuration options for HttpContent.Factory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-20 10:00:04 +11:00
Joakim Erdfelt 259deea2f7
Jetty 12 - Resource `resolve()` and `newResource()` return null on resources that do not exist (#8702)
* Resource `resolve()` and `newResource()` return null on resources that do not exist
* Introduce `Resources` utility methods and use them
* Updating javadoc
2022-10-19 15:50:37 -05:00
Joakim Erdfelt 9061348ec4
Jetty 12 - Simplification of aliases in `PathResource` (Take 2) (#8734)
* simplify the PathResource.resolveTargetPath code
* changes to how PathResource handles aliases
* fix usages of Resource.getTargetUri()
* fixes for FileSystemResourceTest
* update javadoc for Resource.getTargetURI()
* rename getTargetURI to getCanonicalURI
* let resolveCanonicalPath return null if resource does not exist
* add test in PathResourceTest for broken symlinks
* some changes from review + optimization for exists()
* restore name to getTargetUri in Resource
* fix some tests related to PathResource changes
* revert changes to PathResource equals and hashcode
* also compare URI in PathResource
* checkAlias to resolveAlias
* PathResource cleanup
+ Adding comments about class fields.
+ Removing normalization from
  input/output/comparison flows.
+ Collapsing `resolveTargetPath`
  into `resolveAlias` to react
  accordingly to the exceptions
  that can flow out of Path.toRealPath().
+ Failure on Path.toRealPath() is never
  an alias, as the resource cannot ever
  be served anyway.
+ More comments in `resolveAlias()`
+ Failed / Bad / Nonexistent / Inaccessible
  resources are not aliases to anything.
* Renames of targetPath/targetUri
  `targetPath` to `realPath`
  `targetURI` to `realURI`
* Cleanup alias/aliasResolved booleans
* More testcase cleanup around not-exist
* Don't resolve alias on Error during toRealPath
* Add test to check how Alias check behaves if non-existent resource exists later

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 11:17:23 -05: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 6016106442 re-enable DeploymentTest#testDifferentWebAppsWithSameClassInSignature for ee10 websocket
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 15:58:53 +11:00
Lachlan Roberts 40d0087351 Re-enable WebSocketServerExamplesTest by fixing JsrHandshakeRequest impl
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 15:57:29 +11:00
Lachlan Roberts 205f581c75 re-enable DeploymentTest#testBadPathParamSignature for ee10 websocket
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 15:32:19 +11:00
Lachlan Roberts 40a91a16f2 fix ReaderEchoTest for ee10 websocket
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 15:30:59 +11:00
Lachlan Roberts 57d4ffec41 Fix InputStreamEchoTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 15:30:15 +11:00
Lachlan Roberts 9866a83d24 Fix AnnotatedServerEndpointTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 15:28:13 +11:00
Joakim Erdfelt ad406ac44c
Cleaning up test cases with eye on work/temp file management 2022-10-18 07:50:44 -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
Joakim Erdfelt 00c06738f0
Use MavenPaths where appropriate (ee9 -> ee8 conversion helper) 2022-10-17 15:23:24 -05:00
Joakim Erdfelt 28c34d402e
Use WebAppContext.getResourceFactory() 2022-10-17 15:23:03 -05:00
Joakim Erdfelt 2badb454b3
Fixed war file unpacking 2022-10-17 15:22:32 -05:00
Joakim Erdfelt 62db79b791
Improved addClassPath and addJars behavior
+ Less code
+ Corrected javadoc
2022-10-17 15:22:16 -05:00
Joakim Erdfelt bb887c9c81
Don't add bad URIs, and log if they don't point to anything 2022-10-17 15:22:00 -05:00
Joakim Erdfelt b1c00223aa
Protect on bad container resources 2022-10-17 15:21:33 -05:00
Joakim Erdfelt 02142c2e30
Improved warning on bad descriptor 2022-10-17 15:21:19 -05:00
Joakim Erdfelt 6ab8aa8d30
Skip welcomeServlet logic if requestTarget
does not resolve.
2022-10-17 15:21:04 -05:00
Joakim Erdfelt feadf3f56e
Improved setup of TestMetaData 2022-10-17 15:18:02 -05:00
Joakim Erdfelt d84de5d847
Improved reliability of test 2022-10-17 15:17:27 -05:00
Joakim Erdfelt 6b2425a23f
Improved ClassMatcher/Location behavior.
+ Reduces need for Resource / ResourceFactory.
+ Corrected path equals logic
2022-10-17 15:16:50 -05:00
Joakim Erdfelt f27e4e7273
Improved ClassMatcher/Location behavior.
+ Reduces need for Resource / ResourceFactory.
+ Corrected path equals logic
2022-10-17 15:16:39 -05:00
Joakim Erdfelt 564275280b
Failing on bad Runner inputs 2022-10-17 15:15:30 -05:00
Joakim Erdfelt 81b1a6688d
Better use of WebAppContext.getResourceFactory() 2022-10-17 15:15:05 -05:00
Jan Bartel d47c25d7c5 Reenable ee10 WebAppDefaultServletTest 2022-10-17 14:05:22 +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
Joakim Erdfelt 45e706cb67
Move Resource.combine() methods to ResourceFactory 2022-10-13 14:08:21 -05:00
Joakim Erdfelt 28d448aef6
Fixing directory location name for additional classpath elements 2022-10-13 09:59:07 -05:00
Joakim Erdfelt a8e81ebb39
Using WorkDir properly 2022-10-13 09:57:12 -05:00
Joakim Erdfelt 06d82d30e5
Making tokenPath creating reliable 2022-10-13 09:56:33 -05:00
Joakim Erdfelt 39f77f7e26
Increasing reliability of test on ee9/ee8 2022-10-13 09:55:57 -05:00
Joakim Erdfelt c9910cec13
ServerListener uses Path as it has to Write a file reliably 2022-10-13 09:53:39 -05:00
Joakim Erdfelt caf69690ca
Adding TODO about copyTo() with IncludeExcludeSet 2022-10-13 09:53:18 -05:00
Joakim Erdfelt 58b416952c
Cleanup AttributeNormalizerTest 2022-10-13 09:49:03 -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
Olivier Lamy 573f27fd88
cherry-pick of #7803 (#8708)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2022-10-13 15:53:38 +10: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 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
Jan Bartel 756cf2102e
Fix jaas demos (#8689)
* Fix jaas demos add distro test
2022-10-12 09:33:14 +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
Simone Bordet 2cbb0e19e0
Forward port of PR #7778 to `jetty-12.0.x`.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-10 16:22:26 +02: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 b2d050948d fix javadoc
Signed-off-by: Olivier Lamy <olamy@apache.org>
2022-10-09 07:59:24 +10:00
Joakim Erdfelt 1ae87e03bb
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/jetty-12-servlet-pathmapping-regex 2022-10-07 08:43:49 -05:00
Joakim Erdfelt 04d8c3f451
Updates for test failures 2022-10-07 08:26:39 -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 dd3e3cf6e8
Aligning changes between ee9 & ee10 2022-10-07 05:36:20 -05:00
Joakim Erdfelt 25dd6d0ef7
Cherry-pick of Improvements to PathSpec for Jetty 10.0.x (#8136)
* Cherry-pick of Improvements to PathSpec.
* From commit: 5b4d1dd1c6
* Fixing ConstraintSecurityHandler usage of PathMappings
* Fixing bad INCLUDE logic from cherry-pick in ServletHandler.doScope()
* Cleanup of non ServletPathSpec behaviors in ServletPathMapping class
* Skip optional group name/info lookup if regex fails.
* Prevent NPE on static servletPathMappings
* Update WebSocketMappings to use new PathMappings.getMatched(String)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-10-06 15:50:18 -05:00
Greg Wilkins 351fe53c9a
Fix #7891 regex pathInfo (#7892)
Fix 7891 regex pathInfo

+ Use the pathSpec methods to set servletPath and pathInfo when possible

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2022-10-06 15:44:01 -05:00
Greg Wilkins 024a053455
Issue #7748 - allow override of path mapping behavior in ServletContextHandler (#7614)
Added protected method to ServletHandler to allow other servlet mappings (eg regex) in embedded/extended usage

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-10-06 15:42:12 -05:00
Joakim Erdfelt d7288cbcd2
Remove deprecated methods from QoSFilter 2022-10-06 11:36:32 -05:00
Joakim Erdfelt 281f0dc495
Fix bad test cases from merge 2022-10-06 09:17:48 -05:00
Jan Bartel f1e39433e8 Fix context paths for some ee10 and ee8 demos 2022-10-06 14:59:07 +11: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
Jan Bartel b85f904520
Re-enable and fix loginservice tests ee10 (#8683) 2022-10-06 07:33:51 +11:00
Joakim Erdfelt 4c74dac122
Fixing left-over ee10 replace -> replaceAll javascript usages 2022-10-05 15:31:55 -05:00