Commit Graph

3287 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
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
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
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 dbccc4d591
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2024-03-01 16:57:17 -06:00
Joakim Erdfelt bd0f081201
Fixing deps on testcontainers 2024-03-01 15:19:51 -06: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
Simone Bordet 561b8da4dd Changed CrossOriginHandler default to allow no origin and no credentials.
This makes the default configuration more secure and explicitly requires configuration from users.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-02-29 15:47:20 +01: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
Jan Bartel 06d4b6ff13
Re-enable GZIP module tests (#11450) 2024-02-27 13:40:32 +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
Simone Bordet 535e772c7e Updated code to use new UnixDomain APIs explicitly, rather than via reflection.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-02-23 18:47:24 +01:00
Simone Bordet 9b64130ddc
Fixes #11432 - Review number of acceptor threads. (#11436)
Defaulted to 1.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-02-23 15:33:27 +01:00
Lachlan 33e00dc452
Merge pull request #11279 from jetty/jetty-12.0.x-11271-AliasCheckCombinedResource
Issue #11271 - fix use of AliasCheckers with CombinedResource
2024-02-22 08:48:54 +11:00
Greg Wilkins 750584bc85
Experiment with ArrayByteBufferPool performance (#11426)
* Experiment with ArrayByteBufferPool

No overall size accounting
reserved buffer release always checks max memory
released buffers check max memory 1% of the time.
only a single thread can check memory at once.
single pass through buckets so no looping forever.

* Experiment with ArrayByteBufferPool

updates from review

* JMH updates

* updates from review

* Fixed comments.
Fixed call to recordEvict().
Removed unused methods.
Method getAvailable*Memory() no longer JMX-enabled, as they are the same as get*Memory().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>

---------

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2024-02-21 22:03:00 +01:00
Simone Bordet 8fec190b9c Fixes #9341 - jetty-jmh 10.013 fails due to "java.lang.AssertionError: No trie for TernaryTrie"
Fixed by using an enum and expression switch to avoid using string constants that may become obsolete.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-02-21 15:18:47 +01:00
Simone Bordet d02406c164
Fixes #11371 - Review ArrayByteBufferPool eviction. (#11400)
* Fixes #11371 - Review ArrayByteBufferPool eviction.

* Eviction is now performed on release(), rather than acquire().
* Memory accounting is done on release(), rather than acquire().
This is because we were always exceeding the memory usage on acquire(), by returning a non-pooled buffer.
We only need to account for what is idle in the pool, and that is done more efficiently on release(), and it is leak-resistant (i.e. if the buffer is not returned, the memory is already non accounted for, keeping the pool consistent).
* Released entries now give precedence to Concurrent.Entry, rather than Queued.Entry, so the queued pool is always kept at minimum size.
* Changed eviction algorithm to be simpler: one pass through the buckets excluding the current, trying to remove idle buffers until enough memory is recovered.
If successful, the buffer being released is pooled, otherwise it is also discarded.
* Added detailed statistics to ArrayByteBufferPool.RetainedBuckets.
* Added statisticsEnabled property in Jetty module bytebufferpool.mod.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-02-20 11:02:11 +01:00
Lachlan Roberts 87aeefbbc9 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-11271-AliasCheckCombinedResource 2024-02-15 23:48:40 +11:00
Lachlan Roberts 03313567e8 PR #11279 - fixes for AliasCheckerMultipleResourceBasesTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-01-31 01:13:08 +11:00
Joakim Erdfelt 82d9177f0c
Updating to version 12.0.7-SNAPSHOT 2024-01-29 21:04:51 -06:00
Joakim Erdfelt 78ab6e6ba1
Updating to version 12.0.6 2024-01-29 20:42:49 -06:00
Joakim Erdfelt dd641b2736
Updating to version 11.0.21-SNAPSHOT 2024-01-29 15:17:40 -06:00
Joakim Erdfelt 922f8dc188
Updating to version 11.0.20 2024-01-29 15:03:56 -06:00
Joakim Erdfelt a7d14d6874
Updating to version 10.0.21-SNAPSHOT 2024-01-29 14:58:51 -06:00
Joakim Erdfelt 3a745c71c2
Updating to version 10.0.20 2024-01-29 14:46:10 -06:00
Simone Bordet 4e28331595
Fixes #11095 - IllegalStateException for completed requests with GzipHandler (#11210)
* In ServletChannel, in COMPLETE state, there was a check comparing the number of bytes written with that declared by Content-Length.
Unfortunately the check was wrong in case of gzip, because it was comparing the application length with the gzipped length, resulting in a late sendErrorOrAbort() that was an abort() because the response was already fully sent.
Furthermore, if sendErrorOrAbort() was actually an abort(), there was an unnecessary attempt to complete the output.
* In GzipHandlerResponseAndCallback there were 2 last writes: one when the application calls output.close(), and one when the callback is succeeded.
Furthermore, when no content needs to be written, it was still compressed, causing an IOException in ChannelResponse (again when double-checking the bytes written, since Content-Length was 0, but the gzip header and trailer were written).
* Updates semantic of when to add the "Vary" header.
Now it is always only added by GzipHandler, when it would be possible to generate a response that might be compressed (even if it will not).
* Added *.bz2 mime-type.
Updated GzipHandler with the correct mime-type for *.bz2: application/x-bzip2.
* Improved checks for the number of bytes written against declared content-length.
This is necessary because welcome files are written by DefaultServlet (most of the times) bypassing the Servlet classes, using ServletContextResponse directly.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2024-01-27 10:50:30 +01:00
Joakim Erdfelt 929e656b36
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2024-01-25 11:00:39 -06:00
Joakim Erdfelt 6fec10e51e
Issue #11260 - Allow `QuickStartConfiguration` to be used in mixed contexts environment where some do not have a WEB-INF/quickstart-web.xml (#11261)
* QuickStartConfiguration updated

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2024-01-25 11:00:13 -06:00
Simone Bordet b5d0fd6f2f
Fixes #11096 - IllegalAccessException when invoking WebSocket endpoint methods in Jetty 12 (#11229)
Changed `JettyWebSocketFrameHandlerFactory` to use an application MethodHandle.Lookup (rather than a server one) when creating listener metadata.
This fixes the JPMS problem so that now JPMS applications do not need any additional configuration to invoke endpoints.
The (acceptable) downside is that anonymous inner classes (that are not public) cannot be used as listener endpoints.

This change affects core and EE10 WebSocket; EE9 and EE8 WebSocket have not been fixed (so they allow anonymous inner classes but are broken in JPMS).

Renamed "connectLatch" fields to "openLatch" in test classes.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Olivier Lamy <olamy@apache.org>
Co-authored-by: Olivier Lamy <olamy@apache.org>
2024-01-25 16:40:48 +01:00
Joakim Erdfelt 11b4b32d93
Fixing DistributionTests.testSendDateHeader() 2024-01-25 08:20:52 -06:00
Joakim Erdfelt b571c6a2d3
Issue #11292 - Missing Date Response Header. (#11293)
* Add Unit Tests for Date Response header
  in ee10 and Distribution
2024-01-24 18:23:19 -06:00
Simone Bordet ce928e5ff1
Reorganized and refactored JettyHomeTester to introduce JPMSTester. (#11228)
* Renamed module "jetty-home-tester" to "jetty-testers".
* Moved JettyHomeTester to module jetty-testers.
* Introduced JPMSTester, refactoring common code with JettyHomeTester.
* Changed File-based APIs in favor of Path APIs.
* Introduced ProcessWrapper to simplify process forking.
* Refactored tests to follow refactoring changes.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-01-24 18:56:27 +01:00
Simone Bordet a9e564ad8c
Fixes #10220 - Implement CrossOriginHandler. (#11093)
Introduced CrossOriginHandler.
Added cross-origin Jetty module.
Added CrossOriginHandler documentation to the programming guide.
Added CrossOriginHandler documentation to the operations guide.
Added cross-origin headers to the HttpHeader enum.
Added test cases.
Deprecated ee10 CrossOriginFilter.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-01-12 09:57:21 +01:00
Joakim Erdfelt dc96d91eef
Revert "Issue #11260 - Allow `QuickStartConfiguration` to be used in mixed contexts environment where some do not have a WEB-INF/quickstart-web.xml"
This reverts commit d6015606ea.
2024-01-11 11:17:06 -06:00
Joakim Erdfelt d6015606ea
Issue #11260 - Allow `QuickStartConfiguration` to be used in mixed contexts environment where some do not have a WEB-INF/quickstart-web.xml
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2024-01-11 11:16:30 -06:00
dependabot[bot] 49c5eb341a
Bump org.eclipse.jetty.toolchain:jetty-test-helper from 6.0 to 6.2 (#11103)
* Bump org.eclipse.jetty.toolchain:jetty-test-helper from 6.0 to 6.2

Bumps [org.eclipse.jetty.toolchain:jetty-test-helper](https://github.com/eclipse/jetty.toolchain) from 6.0 to 6.2.
- [Commits](https://github.com/eclipse/jetty.toolchain/compare/jetty-test-helper-6.0...jetty-test-helper-6.2)

---
updated-dependencies:
- dependency-name: org.eclipse.jetty.toolchain:jetty-test-helper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2024-01-10 08:40:24 -06:00
dependabot[bot] 9abb524ce9
Bump org.eclipse.jetty.toolchain:jetty-test-helper from 6.0 to 6.2 (#11103)
* Bump org.eclipse.jetty.toolchain:jetty-test-helper from 6.0 to 6.2

Bumps [org.eclipse.jetty.toolchain:jetty-test-helper](https://github.com/eclipse/jetty.toolchain) from 6.0 to 6.2.
- [Commits](https://github.com/eclipse/jetty.toolchain/compare/jetty-test-helper-6.0...jetty-test-helper-6.2)

---
updated-dependencies:
- dependency-name: org.eclipse.jetty.toolchain:jetty-test-helper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2024-01-10 08:38:49 -06:00
Joakim Erdfelt 62e073c52c
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2024-01-03 14:08:11 -06:00
Joakim Erdfelt ee0e1d47fe
Prevent rogue slf4j-impl coming from wildfly-elytron-2.2.2.Final.jar
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2024-01-03 10:41:38 -06:00
Joakim Erdfelt a84818d398
Ensure test webapps are referenced 2024-01-03 10:41:35 -06:00
Joakim Erdfelt af14a65e4c
Results of: mvn spotless:apply (for sortModules) 2024-01-03 10:41:20 -06:00
Joakim Erdfelt 2f3c9257d1
Results of: mvn spotless:apply 2024-01-03 10:40:38 -06:00
Joakim Erdfelt 36a80b9622
Prevent rogue slf4j-impl coming from wildfly-elytron-2.2.2.Final.jar
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2024-01-03 08:06:54 -06:00
Joakim Erdfelt 97ca925620
Ensure test webapps are referenced 2024-01-03 06:39:03 -06:00
Joakim Erdfelt 204b293d62
Results of: mvn spotless:apply (for sortModules) 2024-01-03 03:16:02 -06:00
Joakim Erdfelt 9a18dc8722
Results of: mvn spotless:apply 2024-01-03 03:12:56 -06:00
Joakim Erdfelt fa8af2f9ad
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2024-01-01 16:03:04 -06:00
Joakim Erdfelt 9423a5b79d
Fixing JSP test case (junit is more strict on parameters order now)
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2024-01-01 13:59:29 -06:00
Joakim Erdfelt 96eea590ee
Updating to version 12.0.6-SNAPSHOT 2023-12-18 08:25:22 -06:00
Joakim Erdfelt 3aed62e495
Updating to version 12.0.5 2023-12-18 08:05:54 -06:00
Joakim Erdfelt fd81c80194
Updating to version 11.0.20-SNAPSHOT 2023-12-15 15:09:03 -06:00
Joakim Erdfelt f781e475c8
Updating to version 11.0.19 2023-12-15 14:54:13 -06:00
Joakim Erdfelt c91e3fbc48
Updating to version 10.0.20-SNAPSHOT 2023-12-15 14:49:33 -06:00
Joakim Erdfelt 8492d1c78f
Updating to version 10.0.19 2023-12-15 14:38:06 -06:00
Simone Bordet 458730a4e1
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-13 20:37:31 +01:00
Simone Bordet efda646319
Fixes #11031 - HttpClient should expose Connection/EndPoint used by H… (#11033)
Introduced method Request.getConnection() to expose the Connection after at the request begin event.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-13 20:34:52 +01:00
Jan Bartel fd1c1e3c9b
Refactor JNDI across environments for common JNDI components that can be in core (#10897)
* Refactor jndi and plus to extract ee agnostic classes to jetty-core
2023-12-05 23:48:20 +01:00
Joakim Erdfelt 8597033339
Updating to version 12.0.5-SNAPSHOT 2023-11-30 13:33:03 -06:00
Joakim Erdfelt 9b415c6424
Updating to version 12.0.4 2023-11-30 13:14:15 -06:00
Simone Bordet 0d5d4d4edb
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-29 13:49:45 +01:00
Gary Gregory 0efee0bf95 Use String#isEmpty() 2023-11-28 17:46:42 -05:00
Olivier Lamy 358c8a7e29
upgrade those versions as Intellij fail because of this (#10924)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-11-27 19:19:39 +10:00
Greg Wilkins e800631120
Weak reference concurrent pool (#10787)
* The Pool is now a list of Holder instances, each with a WeakReference and a strong reference to an Entry.
* Removed thread-local cache from Pool.
* Avoid using deprecated ConcurrentPool constructors.

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-11-09 22:32:50 +01:00
Olivier Lamy b88908236e
Jetty 12 add duplicate classes finder plugin to avoid sames classes with different content coming from different jars (#10767)
* add duplicate finder plugin

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-11-07 06:37:41 +01:00
Joakim Erdfelt c01baac85c
Updating to version 12.0.4-SNAPSHOT 2023-10-26 22:47:29 -05:00
Joakim Erdfelt a873259fd5
Updating to version 12.0.3 2023-10-26 22:24:43 -05:00
Joakim Erdfelt 1e2b356b80
Updating to version 11.0.19-SNAPSHOT 2023-10-26 21:24:54 -05:00
Joakim Erdfelt 5a9a771a9f
Updating to version 11.0.18 2023-10-26 21:14:03 -05:00
Joakim Erdfelt c50aa2f61b
Updating to version 10.0.19-SNAPSHOT 2023-10-26 21:10:08 -05:00
Joakim Erdfelt 8545fd9bf4
Updating to version 10.0.18 2023-10-26 20:59:27 -05:00
Simone Bordet 2fbfe75986
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-26 16:55:05 +02:00
Simone Bordet fa166d09c5
Fixes #10786 - TLS handshake failures leak HttpConnection.RequestTimeouts tasks
Moved the call to destroy the CyclicTimeouts to a close() call that is always called.

Fixed NPE in ManagedSelector.getTotalKeys().

Fixed exception handling to avoid infinite recursion in SslConnection.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-26 16:49:52 +02:00
Joakim Erdfelt e068b5de54
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2023-10-25 22:33:33 -05:00
Joakim Erdfelt 3eddc92783
Updates to jetty.sh and testing to reduce failures (#10790)
+ Updating AmazonCorretto to JDK 17
+ Making sure /etc/default/jetty is populated
  correctly in the user_change mode
+ Removing warnings from jetty startup
  about --start-log-file=... being
  unrecognized
+ Adding unique jetty12 identifier to docker
  image names (helps to keep different jetty
  versions apart when manually testing)
2023-10-26 14:28:01 +11:00
Joakim Erdfelt 31b5518fe3
Updates to jetty.sh and testing to reduce failures
Backport of #10790 to Jetty 10.

+ Making sure /etc/default/jetty is populated correctly in the user_change mode
+ Removing warnings from jetty startup about --start-log-file=... being unrecognized
+ Adding unique jetty10 identifier to docker image names (helps to keep different jetty versions apart when manually testing)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-10-25 20:20:50 -05:00
Joakim Erdfelt d6750b0b25
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-10-25 11:42:55 -05:00
Joakim Erdfelt 9a8daf71ca
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2023-10-25 11:14:55 -05:00
Joakim Erdfelt 92f62a10f9
Improve and test `jetty.sh` behaviors (#10753)
* Issue #10696 - Addressing start-stop-daemon behaviors in jetty.sh
* disable internal pid-file management of start-stop-daemon
* IssueDo not test for file system permissions if user is root, or process will switch to JETTY_USER
* Fixing bad UID / JETTY_USER condition
* Avoid FS test with setuid use as well
* Fixing stop behavior
* Adding jetty.sh docker testing

---------

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Olivier Lamy <olamy@apache.org>
Co-authored-by: Olivier Lamy <olamy@apache.org>
2023-10-25 09:32:15 -05:00
Olivier Lamy ef9abc02e6
tag this test as external (not running on CI) as it is using external resource from https://open.api.ebay.com (#10686)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-10-19 07:07:39 +10:00
Simone Bordet 825fc6df1f
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-16 09:41:45 +02:00
Olivier Lamy fcc88274a4
Jetty 12.0.x use automatic formatter for poms to have same style for every poms (#10578)
* apply spotless sort pom

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-10-12 03:51:36 +02:00
Joakim Erdfelt 6b3f760b80
Updating to version 12.0.3-SNAPSHOT 2023-10-09 21:16:46 -05:00
Joakim Erdfelt b01e3611cf
Updating to version 12.0.2 2023-10-09 20:59:14 -05:00
Lachlan Roberts 70b1fd40ef fix infinite recursion in server dump with Path
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-10-10 11:26:55 +11:00
Joakim Erdfelt c8829f75bf
Updating to version 11.0.18-SNAPSHOT 2023-10-09 13:49:23 -05:00
Joakim Erdfelt 48e7716b94
Updating to version 11.0.17 2023-10-09 13:38:47 -05:00
Joakim Erdfelt 722b97ad6a
Updating to version 10.0.18-SNAPSHOT 2023-10-09 13:32:28 -05:00
Joakim Erdfelt af15f12297
Updating to version 10.0.17 2023-10-09 13:21:53 -05:00
Olivier Lamy 3fe301a8b2
Merge branch 'jetty-10.0.x' into jetty-11.0.x 2023-10-01 15:58:24 +10:00
Joakim Erdfelt 1e1bc5adff
Issue #10606 - Bump build to JDK 21 (#10607)
* Issue #10606 - Bump build to JDK 21
* Fix tests that fail on JDK 21
* better use of `@EnabledForJreRange`
* Disable JAASLdapLoginServiceTest on JDK 20+ via maven profile

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Olivier Lamy <olamy@apache.org>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Olivier Lamy <olamy@apache.org>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-28 16:19:36 -05:00
Lachlan Roberts 26ab27bb80 fix for DistributionTests.testJettyConf
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-09-27 12:15:43 +10:00
Lachlan Roberts 46b1959c9d fixes for merge from 11 to 12
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-09-27 10:13:48 +10:00
Lachlan Roberts 69360b80fd Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-09-27 10:00:08 +10:00
Lachlan Roberts 869887aff6 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2023-09-27 09:57:26 +10:00
Joakim Erdfelt cc8f976d0c
Issue #10473 - Revert jetty.sh pgrep, and update started checks (#10501)
* Revert pgrep usage in jetty.sh
* Adding test for jetty.conf
* Correcting renamed xml file
* Improved started check
+ Improved `started` function code
  - adding comment explaining steps
  - adding named parameters
+ Improved ARGS check for "jetty.state="
  option, to know when to check the
  state file.
* Make sure state.mod is before any deploy steps to ensure jetty-state file is created early.
* Early cleanup / creation of State file
* Improved `started` function
+ Don't attempt to read from State File
  if it doesn't exist
+ Don't attempt to read from PID File
  if it doesn't exist
+ DEBUG in state file logic
+ DEBUG in pid file logic
+ proper startsWith logic for state detection
* Better state debugging and pid kill

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-09-26 16:48:33 -05:00
Olivier Lamy 812d65d7ae
Upgrade gcloud sdk emulator to last 447.0.0-emulators (#10565)
* Upgrade gcloud sdk emulator to last 447.0.0-emulators

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-09-22 02:54:05 +02:00
Olivier Lamy 28f19a5592
get rid of deprecated usage of maven resolver (#10495)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-09-13 05:43:47 +02:00
Olivier Lamy 896a301fc1
Upgrade testcontainers 1.19.0 (fix local issue with upgraded docker version) (#10471)
* add some debug

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

* force use infinispan.client.hotrod.client_intelligence=BASIC looks to fix issue locally after docker upgrade, use new forListeningPorts to check infinispan start

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

* use Wait.forListeningPorts to wait docker image start

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

* cleanup commented code

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

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-09-04 13:09:43 +10:00
Joakim Erdfelt 0543583f65
Merge pull request #10447 from eclipse/release/11.0.16
Merge `release/11.0.16` into `jetty-11.0.x` HEAD
2023-08-31 15:12:22 -05:00
Ludovic Orban 475a706fd1 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2023-08-31 09:30:01 +02:00
Joakim Erdfelt 1d226403da
Updating to version 12.0.2-SNAPSHOT 2023-08-29 16:55:36 -05:00
Joakim Erdfelt 4768745849
Updating to version 12.0.1 2023-08-29 16:38:20 -05:00
Jan Bartel 5808a62660
Issue #10356 Update Weld integration (#10359)
* Issue #10356 Update Weld integration

Signed-off-by: Olivier Lamy <olamy@apache.org>
Co-authored-by: Olivier Lamy <olamy@apache.org>
2023-08-29 11:00:50 +02:00
Joakim Erdfelt cb8c4b6ab2
Updating to version 11.0.17-SNAPSHOT 2023-08-25 14:55:08 -05:00
Joakim Erdfelt bedff458c4
Updating to version 11.0.16 2023-08-25 14:43:04 -05:00
Joakim Erdfelt 896dee2466
Updating to version 10.0.17-SNAPSHOT 2023-08-25 14:27:38 -05:00
Joakim Erdfelt a2735a9ae9
Updating to version 10.0.16 2023-08-25 14:10:55 -05:00
Joakim Erdfelt 900f50f513
Issue #10271 - new jetty-home `pid` module (#10272)
* Issue #10271 - new jetty-home module `pid`

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-08-25 09:12:49 -05:00
Lachlan be11dfdbab
Merge PR #10400 to 12.0.x for InetAccessHandler (#10403)
Issue #10388 - fix InetAccessHandler module

Add DistributionTest for InetAccessHandler
Removed deprecated method from InetAccessHandler.
Fixed InetAccessHandler DistributionTests for 12.

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>
2023-08-25 11:32:46 +02:00
Lachlan Roberts 99c049ef1b Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2023-08-25 18:05:18 +10:00
Lachlan Roberts d6320c4494 fix checkstyle violation
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-25 15:37:40 +10:00
Lachlan Roberts b89398d91c Issue #10388 - add DistributionTest for InetAccessHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-25 14:19:38 +10:00
Joakim Erdfelt fbe4dd8e2a
Make JettyHomeTester more resilient to blank mavenLocalRepository input (#10364) 2023-08-25 06:17:38 +02:00
Simone Bordet 4c32dfc4d8
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-24 18:56:21 +02:00
Simone Bordet b6a298f089
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-24 18:47:30 +02:00
Lachlan c55363d43f
cleanups of DateCache (#10176)
* improve the formatting for precise ms in DateCache
* return original format string with DateCache.getFormatString
* calculate index in tick constructor because format strings can be different size
* use two ticks so that switching between seconds is less likely going to have cache miss
* use boolean instead of index to denote if sub second is needed
* remove formatWithoutCache and replace with doFormat as it doesn't work with sub second time
* allow the option of not having sub second precision
* use two separate formatters for the prefix/suffix around the SSS format code
* use a simple class to store both ticks in DateCache
* rename DateCache.Tick.getString(long) to format()

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-24 18:43:46 +02:00
Simone Bordet c3f52c3ec7
Fixed range of Java versions for testVirtualThreadPoolPreview().
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-24 11:35:42 +02:00
Simone Bordet 04b53f3f15
Specifying the $JETTY_BASE directory in testVirtualThreadPoolPreview().
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-23 18:01:10 +02:00
Simone Bordet 7f1d262aee
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-23 15:47:15 +02:00
Simone Bordet 9efe3a113a
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-23 13:43:48 +02:00
Simone Bordet 153f5dfae8 Fixes #10350 - Support Java 21 virtual threads
* Introduced module `threadpool-virtual` for Java 21.
* Updated virtual threads documentation to refer to Java 21.
* Updated requirements that the releases should use Java 21, so that the documentation can properly render the virtual threads documentation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-23 11:58:24 +02:00
Olivier Lamy 97e1527ed6
Jetty 12.0.x use Maven build cache for PRs and branches except jetty-12.0.x main branch (#9871)
* apply configuration/changes for build cache

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

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-08-22 02:46:46 +02:00
Simone Bordet 486ec677cf
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-21 10:43:49 +02:00
Simone Bordet 295cbe4d5a
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-21 09:01:22 +02:00
Simone Bordet e91a68923a
Fixes #8926 - HttpClient GZIPContentDecoder should remove Content-Len… (#10326)
Now Content-Length and Content-Encoding are removed/modified by the decoder.
In this way, applications have a correct sets of headers to decide whether to decode the content themselves.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-21 08:58:22 +02:00
Joakim Erdfelt 7cd55498e2
Issue #10158 - tests to prove out XML only based deployment technique (#10209) 2023-08-17 16:48:59 -05:00
Joakim Erdfelt 9c324326c5
Merge `release/12.0.0` back into `jetty-12.0.x` (#10237)
* Updating to version 12.0.0

* Updating to version 12.0.1-SNAPSHOT
2023-08-08 00:55:19 +02:00
Simone Bordet 8e21e6a5d8
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-31 18:41:35 +02:00
Simone Bordet b2477d1c38
Fixes #10160 - Verify PROXY_AUTHENTICATION is sent to forward proxies (#10162)
Now TunnelRequest.getURI() does not return null, so normalizeRequest() can properly apply the authentication headers.

Moved copy of a request to HttpRequest, so also the sub-type can be copied.
Fixed restore of destination in HttpProxy.HttpProxyClientConnectionFactory.newProxyConnection(): now doing it in the promise rather than in finally block.
Using the proxy destination (not the server's) to send subsequent CONNECT requests in case the first is not replied with 200.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-31 18:39:13 +02:00
Simone Bordet 730620eec1
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-31 15:16:30 +02:00
Simone Bordet 87c24e7258
Fixes #8405 - onAllDataRead() is called twice under h2 if the stream … (#10174)
* Fixes #8405 - onAllDataRead() is called twice under h2 if the stream times out

Per Servlet semantic, HTTP/2 stream timeout should be ignored.

The code was trying to fail the read via `_contentDemander.onTimeout()`, but
then it was still calling `onContentProducible()`, which was returning `true`
because the state of the read was IDLE (all the request content was read) and
the request was suspended.

Now the code checks if the read was really failed; if it is not, then
`onContentProducible()` is not called and so the idle timeout is ignored.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-31 15:13:50 +02:00
Simone Bordet 9093253b4e
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-26 23:02:24 +02:00
Simone Bordet a5a0a6c887
Fixes #10145 - WritePendingException over HTTP/2 tunnel (#10146)
Method HTTP2StreamEndPoint.flush() has a "no pending operation" semantic, but the previous implementation was calling stream.data(), which may become a pending operation if the stream is congested.

Changed the implementation of flush() to return false in the IDLE and PENDING cases.
Now every flush() is converted to a write(), which has the same semantic as stream.data().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-26 22:59:24 +02:00
Simone Bordet c946a41871 Fixes #10123 - MultiPartByteRanges request gets stuck
The handling of reads in MultiPartByteRanges.PathContentSource was broken for ranges that were larger than the read buffer size.

Fixed by properly counting how many bytes are left to read.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-18 21:37:35 +02:00
Simone Bordet f3d8b1539a
Added test case for #10123.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-18 16:12:32 +02:00
Joakim Erdfelt 8e52abe8c9
Merge `jetty-11.0.x` into `jetty-12.0.x` - July 14 (#10108)
* Updating various old/moved URL references found across project (`jetty-10.0.x`) (#10098)

+ Now that the migration of `https://eclipse.org/jetty/` to `https://eclipse.dev/jetty/` has occurred, it is time to review the URI use in our project
+ Updated URLs in poms
+ Added more URIs to XmlConfiguration
+ Updated URLs in module files
+ Updated URLs in documentation
+ Updated URLs in HTML
+ Correcting bad double-scheme URLs (eg: `http://https://www.eclipse...`)
+ Updating text in *.mod files
+ Removing `/current/` from path `/jetty/documentation/current/`
+ Fixing mailing list URL
+ Fixing github URL references in jsps

---------

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-07-14 20:21:11 -05:00
Lachlan Roberts 69728c3773 fix test failure and cleanup jetty core client pom.xml
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-07-03 09:33:20 +10:00
gregw e0133d72bf Merge branch 'jetty-12.0.x' into jetty-12.0.x-9396-websocket-jpms-review 2023-06-30 17:17:16 +02:00
Jan Bartel d3d298c5f3 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-06-29 15:01:19 +02:00
Jan Bartel 0a4232e261 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2023-06-29 14:45:46 +02:00
Jan Bartel c8100b18b8
Update to bundle-plugin-5.1.9 (#9954) 2023-06-29 14:41:04 +02:00
Jan Bartel 7b80b0bbcb
Update plexus-utils to 4.0.0 (#9958)
* Update plexus-utils to 4.0.0

---------

Co-authored-by: Olivier Lamy <oliver.lamy@gmail.com>
2023-06-29 12:56:36 +02:00
Jan Bartel 5dee316da3 Merge remote-tracking branch 'jetty-11/jetty-11.0.x' into jetty-12.0.x 2023-06-29 12:55:35 +02:00
Jan Bartel 801543c4cd Merge remote-tracking branch 'origin/jetty-10.0.x-update-plexus-utils-4.0.0' into jetty-11.0.x 2023-06-29 12:25:44 +02:00
Jan Bartel 20869acff4 Add plexus-xml to test-distribution 2023-06-28 18:51:35 +02:00
Steffen Nießing 939689b669
Spotbugs fixes (#9961)
* Add zone id to DateTimeFormatter

Inline the call to withZone(ZoneId) because it returns a new DateTimeFormatter instead of modifying the current one in-place

Signed-off-by: Steffen Nießing <zuniquex@protonmail.com>

* Remove redundant null-check

The array already was null-checked, so remove the redundant check

Signed-off-by: Steffen Nießing <zuniquex@protonmail.com>

* Cleanup ArrayUtil

ArrayUtil provides static methods only -> Prevent instantiation and remove unused interfaces

Signed-off-by: Steffen Nießing <zuniquex@protonmail.com>

* Remove dead assignment

The charset variable isn't accessed after the assignment anymore

Signed-off-by: Steffen Nießing <zuniquex@protonmail.com>

* Prevent instantiation

TypeUtil contains static members only and should not be instantiated

Signed-off-by: Steffen Nießing <zuniquex@protonmail.com>

* Remove redundant null-check

The loader variable is checked to be non-null before

Signed-off-by: Steffen Nießing <zuniquex@protonmail.com>

* Restrict charset to ascii

The JavaDoc describes the byte array to contain ascii characters only

Signed-off-by: Steffen Nießing <zuniquex@protonmail.com>

* Prevent instantiation

StringUtil contains static members only

Signed-off-by: Steffen Nießing <zuniquex@protonmail.com>

* Prevent instantiation

IO contains static members only

Signed-off-by: Steffen Nießing <zuniquex@protonmail.com>

---------

Signed-off-by: Steffen Nießing <zuniquex@protonmail.com>
2023-06-26 18:24:13 +02:00
Olivier Lamy f2aee378a3
ensure DemoModulesTest use random port for ssl connector (#9969)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-06-26 12:47:58 +02:00
Ludovic Orban bf2ef887b8 Specify jetty.ssl.port to the command that actually executes jetty
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-06-26 11:05:26 +02:00