Commit Graph

3052 Commits

Author SHA1 Message Date
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
Ludovic Orban f6e963c841
Disable parallel execution of module that contains DistributionTests (#9952)
Specify jetty.ssl.port to avoid clashes with parallel tests

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-06-23 17:04:22 +02:00
Jan Bartel 151d487fb9 Update plexus-utils to 4.0.0 2023-06-23 16:06:58 +02:00
Greg Wilkins 0b1c28a888
Jetty 12 inserted handler in ee10 servlet context (#9927)
This PR refactors the ee10 handing of servlet API request and response objects:

 + The ServletContextHandler matches the request to a servlet and creates a one time only ServletContextRequest and a ServletContextResponse
 + A reusable ServletChannel object with all the heavy weight HttpInput and HttpOutput object is associated with the ServletContextRequest and ServletContextResponse.
 + Once the handling reaches the ServletHandler, the possibly wrapped request, response and callback are associated with the ServletChannel before handling.
 + Were possible the ServletApiRequest and ServletApiResponse use the possibly wrapped request/response

Added tests to check that GzipHandler can now be nested inside of an EE10 context.

---------

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: gregw <gregw@webtide.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2023-06-22 17:04:49 +02:00
Lachlan Roberts cf78881f04 Issue #9396 - Improve JPMS testing for websocket in Jetty 12
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-06-19 14:34:40 +10:00
Greg Wilkins 926a15aa62
fixing JPMS and reactivating the tests (#9911)
* WIP fixing JPMS and reactivating the tests

* fix jndi demos with jpms activated

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

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
Co-authored-by: Olivier Lamy <olamy@apache.org>
2023-06-16 12:52:11 +10:00
Olivier Lamy a617784e8e
Remove duplicated classes from test session, fix some to be able to run in parallel and not restarting 3rd party for each tests (#9782)
---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-06-09 06:47:36 +10:00
Jan Bartel 64b54adb9c
Remove unused ee10-demo-realm files and add distro test (#9886) 2023-06-08 18:54:10 +02:00
Jan Bartel 18a0738923
Issue #9879 re-enable and fix rewrite demo (#9882) 2023-06-07 19:13:44 +02:00
Ludovic Orban c1f1a6018b Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-06-05 17:31:13 +02:00
Ludovic Orban fc36c903c0 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2023-06-05 17:23:43 +02:00
Simone Bordet 22641f1267
Fix/jetty 12 restore ee n fcgi (#9796)
* Restored ee9 FastCGIProxyServlet and TryFilesFilter.
* Restored ee10 FastCGIProxyServlet and TryFilesFilter.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-06-05 16:50:11 +02:00
Joakim Erdfelt 5b830a4466
Fixes #9795 - jetty-slf4j-impl is non-optional on some modules (#9800)
* jetty-slf4j-impl is non-optional on some modules
* Using appropriate slf4j impl depending on module.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-06-05 06:37:05 -05:00
Simone Bordet 8c4e75bf8d
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-28 00:34:49 +02:00
Ludovic Orban 97ce1daa0b Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2023-05-26 23:27:58 +02:00
Ludovic Orban 871022f3b0 #9397 add trust store config to H3
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-05-26 23:09:24 +02:00
Ludovic Orban e30b23aca6 #9397 fix keystores with invalid Subject Alternate Names
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-05-26 23:09:24 +02:00
Ludovic Orban 33e9b5343f Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-05-15 10:03:43 +02:00
Ludovic Orban 7ac49cd43c
H3: Fix racy read from stream-less channel (#9761)
* #9655 introduce new Stream.Client.Listener.onNewStream() method to allow setting the channel's stream before sending any data to the network

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-05-15 09:50:36 +02:00
Greg Wilkins 4b67abcf38
Jetty 12 immutable ee10 configurations (#9724)
* Immutable EE10 Configurations
2023-05-13 08:17:42 +02:00
Greg Wilkins 7275bf15a9
Jetty 12.0.x core security (#9405)
core security module

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: gregw <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Jan Bartel <janb@webtide.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-02 15:35:49 +02:00
Olivier Lamy 46018e6057
Jetty-12.0.x tests in parallel (down build time on CI from 1h25 to 55min) some modules are still not parallel due to some static usage (#9635)
* parallel tests runs

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-04-21 10:42:12 +10:00
Joakim Erdfelt 1efe9afdf8
Updating to version 11.0.16-SNAPSHOT 2023-04-11 13:53:30 -05:00
Joakim Erdfelt 5bc5e562c8
Updating to version 11.0.15 2023-04-11 13:37:23 -05:00
Joakim Erdfelt ca3c1756ad
Updating to version 10.0.16-SNAPSHOT 2023-04-11 13:23:25 -05:00
Joakim Erdfelt 68017dbd00
Updating to version 10.0.15 2023-04-11 12:24:32 -05:00
Lachlan Roberts 47af2a378f Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-04-11 14:08:13 +10:00
Lachlan Roberts a77c8798f4 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2023-04-11 12:21:22 +10:00
Lachlan 24b7d06fd5
Issue #9464 - Add optional configuration to log user out after OpenID idToken expires. (Jetty-10) (#9528)
* improvements to logout from the OpenIdLoginService validate
* respect idToken expiry for lifetime of login
* fix checkstyle error
* Add respectIdTokenExpiry configuration
* changes from review
* rename respectIdTokenExpiry to logoutWhenIdTokenIsExpired
* changes from review

---------

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-04-11 12:20:16 +10:00
Simone Bordet 99dc9c39f5
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-03-31 15:46:01 +02:00
Simone Bordet 814782cb2f
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-03-31 15:39:42 +02:00
Simone Bordet 278ec1be69
Fixes #9237 - Decouple QTP idleTimeout from pool shrink rate. (#9498)
Introduced `QueuedThreadPool.maxEvictCount` to be the number of idle threads that are evicted in one idle timeout.

When set to 1 (the default), the old behavior is reproduced: expiring 1 thread every idle timeout.
When set to larger values, allows to keep around the threads for the idle timeout (in case of further load spikes), but allows to quickly recover OS memory when they are truly idle.

For example, with 2000 threads, 30 seconds idle timeout and idleTimeoutMaxShrinkCount=1, it will take 995 minutes (about 16.5 hrs) to shrink the pool back to 10 threads.
By setting idleTimeoutMaxShrinkCount=100, the thread pool can be shrunk to 10 threads in about 10 minutes.

Note also that the new algorithm is more aggressive at shrinking the thread pool.
Previously, a small load might have been sufficient to never evict any thread, because all threads could take turns at executing jobs so that threads were mostly idle but would never really idle time out.
The new algorithm is more aggressive even in presence of a small load, so that if `minThreads` are sufficient to cope with the small load, then the other threads are evicted.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: gregw <gregw@webtide.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: gregw <gregw@webtide.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2023-03-31 15:36:34 +02:00
Simone Bordet 856d3338f2
Fixes #9391 - port/move Jetty WebSocket APIs, client and server to je… (#9469)
* Moved -api, -common, -client to jetty-core/jetty-websocket.
* Implemented jetty-core/jetty-websocket/jetty-websocket-jetty-server using only Jetty core APIs, not Servlet.
* Fixed Graceful shutdown order.
* Fixed mistakes in HttpFieldsWrapper, wrongly calling HttpHeader.name() instead of asString().
* Updated tests to pass cleanly.
* Fixed BOMs and POM dependencies.
* Introduced websocket-jetty.mod and websocket-jetty-client.mod, now used by ee10's Jetty WebSocket.
* Fixed OSGi references to old artifactIds.
* Added test to show how to lookup and use ServerWebSocketContainer from a Handler.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-03-24 19:42:51 +01:00
Joakim Erdfelt 388d9df4c3
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2023-03-24 08:35:09 -05:00
Joakim Erdfelt 4a761f4aee
Disable broken JDK19 test
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-03-21 07:40:02 -05:00
Joakim Erdfelt cc408b7fe5
Disable broken JDK19 test
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-03-21 07:04:29 -05:00