Commit Graph

29577 Commits

Author SHA1 Message Date
Joakim Erdfelt ffffdcc3c8
Updating to version 12.0.8 2024-03-29 14:31:57 -05:00
Joakim Erdfelt 58293ad1f1
Update Dependencies [12.0.x] - March 2024 (#11591)
* Bump jetty-setuid-jna
* Updating dependencies
* Updating dependencies in jetty-ee10-annotations
* Updating dependencies in jetty-ee10-plus
* Fix jetty-ee8-osgi-boot deps
* Fix jetty-ee9-osgi-boot deps
* Address osgi duplicate resource plugin
2024-03-29 12:23:22 -05:00
Simone Bordet 1b05d49fd8
Allow configuring showCause in ErrorHandler (#11587)
Allows to suppress "caused by" in error message, not only the stacks traces.
ErrorHandler.showCause = false by default.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Dennis Hoersch <dennis.hoersch@springernature.com>
Co-authored-by: Dennis Hoersch <dhs3000+ghtu@posteo.de>
2024-03-29 16:37:56 +01:00
Ludovic Orban 0451bd4b86
Disable Conscrypt tests on aarch64 (#11590)
Disabled client and tests on aarch64 cpu, enabled client tests on all OS.

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-03-29 11:16:06 +01:00
Greg Wilkins 9b6944e04a
Remove usages of URIUtil.toURI and URIUtil.split (#11577)
* Issue #11567 - fix relative path for resourceBase set in DefaultServlet

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Remove the ResourceFactory adaption from between baseResource and a HttpContent.Factory

* Remove toURI usage

* ensure ee9 DefaultServlet encodes the pathInContext

* Moved toURI functionality to ResourceFactory

* use context baseResource if baseResource not set

* removed usages of URIUtil.split

* fixed javadoc

* updates from review

* updates from review

* updates from review

* updates from review

* fixed resource leak in test

* fixed resource leak in test

* updates from review

* Fixes to URIUtil for Windows (#11585)

* Fixes for Windows
* Remove test that is not needed

* inlined resolveOrNew

---------

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2024-03-28 16:32:03 +01:00
Ludovic Orban 89c41b2550
Cleanup Resource IO (#11364)
Refactorings to rationalize and simplify how we do IO with resources internally by introducing the IOResources helper.

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-03-28 11:08:44 +01:00
Olivier Lamy 48f6ab7289
remove unknown maven plugin parameter (#11571)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2024-03-28 02:33:34 +01:00
Simone Bordet e00a71a00f
Fixes #11583 - Broken HTTP/3 tests (#11584)
Initialized PEM directories for both client and server.
Added [lib] section that was missing due to #11263.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-03-27 22:37:33 +01:00
Olivier Lamy ee82c2b761
Issue #10387 configure doclint to not generate verbose useless warning, remove obsolete parameter (#11544)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2024-03-27 22:27:21 +01:00
Joakim Erdfelt 5743193448
Disable flaky test - see https://github.com/jetty/jetty.project/issues/11581 2024-03-27 10:18:48 -05:00
Joakim Erdfelt 05aa1e1b08
Issue #11495 - Add UriCompliance rules that follow the HTTP / URI / Servlet specs for illegal & suspicious characters (#11496)
* Issue #11495 - Add UriCompliance rules that follow the HTTP / URI / Servlet specs for illegal & suspicious characters
* more illegalPathCharacterData test cases
* Correcting SUSPICIOUS_PATH_CHARACTERS semantic (encoded and decoded)
* Check for illegal and suspicious characters as we are parsing the path.
* Only look for ambiguous paths if we know there are dots or encodings.

---------
Co-authored-by: gregw <gregw@webtide.com>
2024-03-27 09:28:30 -05:00
Joakim Erdfelt 121999bf7c
Issue #11539 restore old behavior of `Resource.copyTo()` with regards to existing destination files. (#11540)
* Issue #11539 restore old behavior of Resource.copyTo()
* Do not delete destination resource
  if it exists before copy to restore
  the behavior to what we had in
  Jetty 9/10/11.
* Formalizing IO.resolvePath()
2024-03-27 07:38:00 -05:00
Jan Bartel 94beede357
Issue #11574 war should not be extracted unless configured to do so (#11575)
* Issue #11574 war should not be extracted unless configured to do so
2024-03-27 10:02:16 +01:00
Jan Bartel 92cb3cbe7e
Issue #11572 add check for isDeployable when hot deploy file changes (#11576)
* Issue #11572 add check for isDeployable when hot deploy file changes
2024-03-27 09:59:36 +01:00
Joakim Erdfelt 9defd5d416
Issue #11548 - Replication as jetty-ee10-webapp testcase (#11550)
* Issue #11548 - Replication as jetty-ee10-webapp testcase
* Correct order of WebAppContext.stop

---------

Co-authored-by: Jan Bartel <janb@webtide.com>
Co-authored-by: gregw <gregw@webtide.com>
2024-03-26 07:04:49 -05:00
Olivier Lamy 5ca620e0e6
jetty-12.0.x jdk22 build (#11551)
* test jdk 22 build

Signed-off-by: Olivier Lamy <olamy@apache.org>

* force a newer version of groovy to be used for m-invoker-p because of java22

Signed-off-by: Olivier Lamy <olamy@apache.org>

* test with groovy 4.0.20

Signed-off-by: Olivier Lamy <olamy@apache.org>

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2024-03-26 02:01:32 +01:00
Lachlan 028221e343
Ensure request is set for ContextScopeListener in EE10 (#11518)
* Ensure request is set for ContextScopeListener in EE10
2024-03-25 19:18:00 +01:00
Jan Bartel cfa1bd9b51
Remove old dump.war from WebAppContextTest and replace by generated war. (#11561)
* Remove old dump.war from WebAppContextTest and replace by generated war.
2024-03-25 19:16:02 +01:00
Jan Bartel 2fc7ad87d8
Reintroduce Cross Context Dispatch in Jetty 12 (#11451)
Re-introduce some support for cross context dispatch
2024-03-25 18:44:44 +01:00
Jan Bartel 2aa93575e7
Issue #11558 Ensure jetty created webapp tmpdir fresh each start (#11559)
* Issue #11558 Ensure jetty created webapp tmpdir fresh each start
2024-03-25 17:13:35 +01:00
Simone Bordet 29bed1435f Fixes #11563 - HttpClient InputStream.read() hangs intermittently.
Clarified documentation about HttpClient request and response listener: they cannot block.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-03-25 15:17:14 +01:00
Simone Bordet bb30fdfeca Clarified documentation about using WebSocket endpoints with JPMS.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-03-25 15:16:45 +01:00
Ludovic Orban 13acb1779e
Fix ClosedFileSystemException on hot redeploy (#11549)
#11548 implemented workaround for JDK-8291712

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-03-25 11:13:10 +01:00
Simone Bordet 258a5e04de
Fixes #10870 - How to set HttpConfiguration.securePort when the HTTPS port is dynamic? (#11547)
Introduced NetworkConnector.Listener to notify of open/close events.
Applications can register a listener on one NetworkConnector, be notified when it opens, and configure other components (for example using the NetworkConnector.localPort).

Cleaned up ManagedSelector.CloseConnections, which had code that was not used, and fixed the close of non-connection elements such as the ServerSocketChannel and DatagramChannel (when acceptors=0).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-03-24 20:52:56 +01:00
Simone Bordet 4a22ab3f82
Improvements and cleanups to ErrorHandler. (#11556)
Defaulted showStacks to false, to reduce false positives reported by penetration testing tools.
Deprecated ErrorHandler.badMessageError(), as it was not invoked anymore.
Implemented HttpStreamOverHTTP[2|3].onBadMessage() that was left as TODO.
Simplified the same code for HTTP/1.
Moved invocation of ComplianceViolation.Listener.onRequestEnd() to HandlerInvoker.completeStream().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-03-24 20:51:50 +01:00
Simone Bordet ae6f98ed47
Fixes #7647 - Document org.eclipse.jetty.client.Socks4Proxy "secure" parameter. (#11533)
Added javadocs and documentation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-03-22 16:46:07 +01:00
Simone Bordet 0ab9f68491
Fixes #5857 - Deprecate AbstractConnectionPool "callback" methods. (#11542)
Deprecated idle(), acquired(), released() for removal.
Renamed removed(), now deprecated, to onRemoved() to match with onCreated().
Kept onCreated() and onRemoved() as they are the only methods that are not racy.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-03-22 16:16:50 +01:00
Greg Wilkins 6529fb2430
Fix #11553 restore startWebapp (#11554)
Fix #11553 restore startWebapp to allow interception of the start sequence after MetaData.resolve
2024-03-22 10:41:14 +00:00
Greg Wilkins 51fc906d37
Optimized ReservedThreadExecutor with ThreadIdPool (#11498)
* Introduced ThreadIdPool and replaced ThreadLocal with it
 * Modified ReservedThreadExecutor to be backed by a ThreadIdPool of semaphores

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: gregw <gregw@webtide.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2024-03-21 16:53:14 +01:00
Greg Wilkins 3d49cd3b3c
Allow resolve to return non-existent resources (#11476)
Fix #11411 by allowing non-existent resources to be returned from resolve
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2024-03-21 12:49:50 +00:00
Ludovic Orban ef87cee33d fix copyTo(directory) for resources not backed by a path
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-03-20 18:48:02 +01:00
Ludovic Orban 5de0141423 Make sure testResourceCopyToDirectory() tests copying a file resource to a target folder
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-03-20 18:48:02 +01:00
Ludovic Orban 435384420f Fix Resource.copyTo() + add tests
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-03-20 18:48:02 +01:00
Dennis Hoersch d39dde5213
Allows to change the default ErrorHandler response type (#11522)
Allows to set the default mime type for the error response in `ErrorHandler`.
2024-03-19 19:17:12 +01:00
Joakim Erdfelt c8ea569e5d
Fixing missing dep of testcontainers -> commons-compress -> commons-codec (#11530)
* Fixing missing dep of testcontainers -> commons-compress -> commons-codec

* More commons-codec fixes
2024-03-19 13:11:28 -05:00
Simone Bordet 763999d08a
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-03-19 11:43:29 +01:00
Simone Bordet 19845228c9
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-03-19 11:18:19 +01:00
Simone Bordet 57266039d8 Fixes #11527 - Reduce ByteBuffer churning in HttpOutput.
Now releasing the buffer back into the pool.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-03-19 11:17:28 +01:00
Ludovic Orban 2067ec81e8 upgrade quiche to version 0.20.1
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-03-15 17:32:37 +01:00
Greg Wilkins c25e1aa7ff
Fix PerfRegression by preparing field cache (#11517)
Fix #11513 by preparing the field cache
2024-03-13 21:42:14 +01:00
Joakim Erdfelt d07d13f30a
Merge pull request #11511 from jetty/fix/12.0.x/classmatcher-match-npe
Issue #11510 - Prevent NPE in ClassMatcher.match()
2024-03-13 13:47:29 -05:00
Greg Wilkins c05ae3bb83
Implemented addBeanFromConstructor (#11319)
Added mechanism to safely add beans from a super constructor of ContainerLifeCycle


Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2024-03-13 17:52:55 +01:00
Greg Wilkins ffb5458720
Restored removed constructor (#11512)
Fix #11509 by restoring removed constructor as deprecated
2024-03-13 17:49:58 +01:00
Ludovic Orban 0a2382408f
Fix StatisticsHandler not receiving implicit status 200 (#11487)
#11482 introduce new onComplete event in EventsHandler and use it to record status in StatisticsHandler

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-03-13 17:30:33 +01:00
Joakim Erdfelt c2d0ab29dc
Issue #11510 - Prevent NPE in ClassMatcher.match() 2024-03-12 17:00:15 -05:00
Joakim Erdfelt 369d9f7e2f
Merge remote-tracking branch 'origin/release/12.0.7' into jetty-12.0.x 2024-03-06 11:00:50 -06:00
Jan Bartel efafbedb27 Small fixes to jndi doco 2024-03-06 11:24:47 +01:00
Greg Wilkins 80f912a121
Improve HTTP parsing long look-ahead (#11486)
Use ByteBuffer.getLong to look for entire request (GET / HTTP/1.1) or response (HTTP/1.1 200 OK) line with 2 long lookups.  Failing that, a single long lookup is sufficient to determine the common methods and/or HttpVersion.

* Cleanup generator also

* Added a fallback int lookup
2024-03-05 17:34:14 +01:00
Joakim Erdfelt 77119e817b
More restrictions on dependabot updates in 9.4.x 2024-03-02 08:19:00 -06:00
Joakim Erdfelt f8cbe50d9c
Merge pull request #11481 from jetty/dependabot/maven/jetty-11.0.x/dev-dependencies-df227888ae
[11.0.x] Bump the dev-dependencies group with 1 update
2024-03-02 06:18:24 -08:00