Commit Graph

1002 Commits

Author SHA1 Message Date
Olivier Lamy d2beb2bd3f
Issue #9487 Upgrade to Infinispan 15 (#11503)
* upgrade to final release of infinispan 15

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2024-04-22 10:28:00 +02:00
Greg Wilkins 33feac33e7
Revert "Revert NON_POOLING change" (#11649)
This reverts commit 2bf7d6cecc.
2024-04-18 15:52:03 +10:00
Ludovic Orban d8b910c843 fix activation pattern
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-04-17 10:31:30 +02:00
Ludovic Orban 08223be155 update to use the finalized foreign api of JDK 22
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-04-17 10:31:30 +02:00
Joakim Erdfelt 907f2001ff
Issue #11573 - add new `disable-urlcache.mod` (#11582)
* Issue #11573 - add new disable-urlcache.mod

* Issue #11573 - Adding new testcase

* Remove old tests

* Prevent overlapping unzip("jetty-home.jar") errors
2024-04-15 21:00:23 -05:00
Olivier Lamy ea8139e94a
Issue #11642 restore Jetty ee8 runner (#11650)
* Issue #11642 restore Jetty ee8 runner
---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2024-04-13 10:33:30 +02:00
Greg Wilkins 30bee710f1
Move ClassMatcher to core to have a consistent fix for addServerClasses in all environments (#11566)
* Issue #11514 - Cleanup `jetty.webapp.addServerClasses` property behavior for ee10/ee9/ee8

* Fix test

* Merging patterns (default -> env -> config)

* Moved ClassMatcher to util

* Adding more deprecations

* Changing XML demos/tests to use new getter names

* rollback xml changes in ee9/ee8

---------

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Jan Bartel <janb@webtide.com>
2024-04-12 17:31:47 +10:00
Joakim Erdfelt ecb610aa5d
Merge remote-tracking branch 'origin/release/12.0.8' into jetty-12.0.x 2024-04-03 08:44:45 -05:00
Olivier Lamy 3a66e02053
Merge branch 'jetty-11.0.x' into jetty-12.0.x-merge-11 2024-04-02 19:51:51 +10:00
Joakim Erdfelt b3ef872d6b
Updating to version 12.0.9-SNAPSHOT 2024-03-29 15:20:11 -05:00
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
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
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 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
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
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
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
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
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
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 18b2a7c201
Updating to version 12.0.8-SNAPSHOT 2024-02-29 16:00:27 -06:00
Joakim Erdfelt c89aca8fd3
Updating to version 12.0.7 2024-02-29 15:18:56 -06:00
Jan Bartel 313def717c Issue #11463 Fix flaky session tests 2024-02-29 20:07:22 +01:00
Greg Wilkins 4155e7bc25
Add suppressed failures in Callback failed (#11435)
If an exception is thrown during failure handling, then record the original failure as a suppressed Throwable on the thrown exception
2024-02-29 20:06:50 +01:00
Joakim Erdfelt 4aeec060ac
Fixing merge - removing double/nested hasViolations() check 2024-02-28 08:53:42 -06:00
Joakim Erdfelt 1bba3cd41e
Merge pull request #11455 from jetty/fix/12.0.x/webinfconfig.unpack.protection
Improve DEBUG during WebInfConfiguration.unpack
2024-02-28 04:17:38 -08:00
Joakim Erdfelt 97cb50ead9
Improve Error messages for Ambiguous URIs (#11457)
* Some testing of HttpURI for Issue #11448
* Issue #11448 - improved stacktrace message for ambiguous URI
2024-02-28 06:15:56 -06:00
Joakim Erdfelt 98ceb73cc6
Issue #11387: Reintroduce MultiPartCompliance.LEGACY in ee9/ee8 (#11388)
* Issue #11387: Reintroduce MultiPartCompliance.LEGACY in ee9/ee8
* Correcting javadoc
* Updating MultiPartCaptureTest to ...
  * Test with MultiPartFormData.Parser and MultiPart.Parser
 * Enable all test cases
    * base64 behaviors modified to not auto-decode base64 content
    * forms submitted without `_charset_` part (some using a different
       charset than UTF-8, like `Shift_JIS`)
* Fixing checkstyle warning
* Re-enable Part-ContainsContents expectations
* Rename MultiPartCompliance.NO_CRLF_AFTER_PREAMBLE to WHITESPACE_BEFORE_BOUNDARY to fit spec better
* Make ee9/ee8 legacy parser use legacy tokenization
* Testing ee9/ee8 legacy parser base64 auto-decoding behaviors
* Cleanup jetty-test-multipart class naming
* Adding ee10 tests against raw multipart examples
* Adding shorter whitespace multipart test
* Adding jetty-core version of failing ee10 tests
* Fixed missed notification for CR content in case of 1 chunk ending with CR and the next chunk ending with LF.
* Removed internal unused class MultiPartParser.
* Adding MultiPartCompliance.Violation events
  + in MultiPart.Parser
  + in MultiPartFormData.Parser
* lenient mode behavior
* new name fits violation better
+ adding violation to MultiPart.Parser.parseHeaderStart
* some simple cleanup of new ee9 code

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2024-02-27 15:09:26 -06:00
Joakim Erdfelt 54aaa3a398
Improve DEBUG during WebInfConfiguration.unpack 2024-02-27 10:15:24 -06:00
Joakim Erdfelt bb646ed085
Improve jetty-util on Windows (#11440)
* Improve jetty-util on Windows
* Enable ATOMIC_MOVE on Resource.copyTo()
* Add reference to Resource impl in exception.
* Attempting to address sneaky Windows path strings that look like URIs
* Deprecate URIUtil.correctFileURI in favor of new URIUtil.correctURI method
2024-02-27 06:32:44 -06:00
Lachlan 4f1401438a
Merge pull request #11433 from jetty/fix/jetty-12.0.x/11278-symlink-dir-listing
Issue #11278 - fix 500 response when trying to display symlinked directory
2024-02-27 17:10:55 +11:00
Simone Bordet 6facb0f7f5
Fixes #11370 - IllegalStateException when last write fails. (#11439)
Removed the call to `ServletChannel.abort()` from the write callback.

As the write was issued from `ServletChannel.handle()` case COMPLETE, it was eventually calling `ServletChannelState.completed(Throwable)`, which is expecting the requestState to be COMPLETING.
However, calling `abort()` would set the requestState to COMPLETED, causing the IllegalStateException.

There should be no need to call `abort()` from the callback of failed writes, since failing the various callbacks should be enough, eventually failing the `HttpStream`, which would take care of tearing down the connection (HTTP/1) or the stream (HTTP/2+).

Now aborting the response from ServletChannelState.completed(Throwable).
Fixed SizeLimitHandler exception message.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-02-26 17:27:20 +01:00
Simone Bordet 24c1140917
Fixes #8979 - Jetty 12 - HttpClientTransport network "modes". (#11368)
* Introduced oej.io.Transport as the abstraction for the low-level transport of high-level protocols.
Now protocols such as HTTP/1.1 or HTTP/2 can be transported over TCP, QUIC, Unix-Domain, memory, and possibly over other low-level custom protocols too.
* Introduced oej.client.Request.transport(Transport) to specify Transport for each request.
* Introduced Transport to [HTTP2Client|HTTP3Client].connect(...) methods.
* Introduced [Client|Server]QuicConfiguration so that it can be used in other Connectors such as MemoryConnector.
* Introduced oej.server.MemoryConnector and EndPoint.Pipe for memory communication between peers, along with a MemoryTransport.
* Introduced QuicTransport as a wrapper for other Transports, so that QUIC can now also be transported over memory.
* Improved javadocs and documentation.
* Removed usage of ClientConnector.forUnixDomain() from FastCGIProxyServlet (ee10 and ee9).
* Replaced usage of HTTP3ServerConnector with QuicServerConnector in jetty-http3.xml.
* Fixed handling of Instruction notifications in case of re-entrance.
Now first clear the list, then notify to avoid that when re-entering the same instruction is notified multiple times.
* Introduced ContentSourceRequestContent, and updated ProxyHandler to use it.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-02-26 17:24:24 +01:00
Jan Bartel a1cb4750d7
Jetty 12.0.x 11377 fix jettyhome osgi path (#11418)
* Issue #11377 fix jettyhome osgi path and  WebInfConfiguration.unpack for windows
2024-02-26 12:07:10 +01:00
Joakim Erdfelt bfac61cd89
Issue #11424 - Document default of `jetty.deploy.scanInterval` at `0` (#11437)
+ Update documentation and defaults in mod files
2024-02-22 14:25:01 -06:00
Lachlan Roberts 9234331d62 Issue #11278 - fix 500 response when trying to display symlinked directory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-02-22 17:32:50 +11:00