Commit Graph

27007 Commits

Author SHA1 Message Date
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
Baoyi Chen 8404eb0db1
Add log.isDebugEnabled() to reduce string allocation (#8743)
Signed-off-by: Baoyi Chen <chen.bao.yi@qq.com>
2022-10-20 17:28:01 +10: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
Simone Bordet ed3d4a46c7
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-19 18:36:25 +02:00
Simone Bordet 9e4e680c67
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-19 18:35:38 +02:00
Gili Tzabari 481c801c3c
Jetty 10 - #8591: Indicate units of HttpClient properties (#8728)
* Fixes #8591: Indicate units of HttpClient properties.
2022-10-19 18:34:34 +02: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
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 c85f3f40a3 fix all disabled tests in websocket ee9
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 16:55:47 +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
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
Simone Bordet 02a7f1cce1
Re-enabled distribution tests that were disabled. (#8722)
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-18 20:10:57 +02: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
Ludovic Orban 38e7f1e742 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2022-10-18 09:18:05 +02:00
Ludovic Orban 5a9f3fb831 #8695: update to quiche 0.16.0
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-10-18 09:14:04 +02:00
Ludovic Orban b27a528cf5 #8695: move client address binding to QuicClientConnectorConfigurator
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-10-18 09:14:04 +02:00
Ludovic Orban 3c6c83da07 #8695: make sure the Foreign binding is used for testing when running on JDK 17 and not any older nor a more recent version.
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-10-18 09:14:04 +02:00
Ludovic Orban 15e90acab6 #8695: fix inconsistencies between quiche's native API and its JNA/Foreign bindings
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-10-18 09:14:04 +02:00
Ludovic Orban d6a101d463 #8695: update quiche to version 0.15.0
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-10-18 09:14:04 +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
Joakim Erdfelt 3c5fb319ec
Fixing ee9 MetaInfConfigurationTest usage of classpath to be compatible with ee8 conversion. 2022-10-17 17:09:36 -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 65c5e93351
Fixing checkstyle 2022-10-17 15:33:14 -05: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 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 1b790d51b4
Use WebAppContext.getResourceFactory() 2022-10-17 15:20:15 -05:00
Joakim Erdfelt f0856a4c7d
Fixed war file unpacking 2022-10-17 15:19:56 -05:00
Joakim Erdfelt a454150e7f
Improved addClassPath and addJars behavior
+ Less code
+ Corrected javadoc
2022-10-17 15:19:32 -05:00
Joakim Erdfelt 3e8697f926
Log bad Classpath URI entries 2022-10-17 15:18:43 -05:00