Commit Graph

28912 Commits

Author SHA1 Message Date
Olivier Lamy 367936e5a3
Merge branch 'jetty-10.0.x' into jetty-11.0.x 2023-09-27 21:32:14 +10:00
Olivier Lamy e76ce45ad7
upgrade commons-compress to 1.24.0 (#10588)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-09-27 13:31:18 +02:00
Lachlan 1707724289
Merge pull request #10585 from eclipse/jetty-12.0.x-mergeHpack
merge 11.0.x into 12.0.x
2023-09-27 15:08:43 +10: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
Lachlan 467052975e
improve testing of http2 client and refine default config (#10580)
* improve testing of http2 client and refine default config
* improve testing in HTTP2Test for hpack

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-09-27 09:57:06 +10:00
Greg Wilkins 1a207dbeea
An omnibus PR for changes needed to support webfunctions (#10563)
Web functions are currently supported with servlets. These changes add/move utility classes to core to better support direct usage of core APIs
 * increase usage of Charset in request
 * Added flush mechanism to BufferedContentSink
2023-09-27 09:29:15 +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
Ludovic Orban 1bcb6d72be Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2023-09-26 18:17:49 +02:00
Ludovic Orban b5124fd7c9 handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-26 18:16:23 +02:00
Ludovic Orban 0928204db7 allow configuring a custom ScheduledExecutorService into ScheduledExecutorScheduler
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-26 18:16:23 +02:00
Ludovic Orban d2dff9a758
Fixes #10483 - Improve BufferedResponseHandler
* Changed default buffer size from 2 GB to 16 KB.
* Make max buffer size configurable.
* Introduce `BufferedContentSink` with all the buffering logic, doing only one buffer copy instead of two, starting with a small buffer and growing it if needed.
* Refactor `BufferedResponseHandler` to delegate all buffering work to `BufferedContentSink`
* Introduced `ByteBufferAggregator` to aggregate ByteBuffers into a single ByteBuffer.

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: gregw <gregw@webtide.com>
2023-09-26 10:13:35 +02:00
Ludovic Orban 53ad119912 upgrade to jetty-setuid version 2.0.2
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-26 09:24:24 +02:00
Simone Bordet 5dc6062376
Fixes #10482 - RewriteHandler with multiple HeaderPatternRules. (#10572)
Reviewed the implementation of RewriteHandler, that was broken for those rules that were overriding `Rule.Handler.handle()`.

The problem was that the handling was not forwarded along the chain of rules, so only the last one was applied.

Now the wrapping at the constructor produces RH3(RH2(RH1(Request))), but the handling is performed from the innermost towards the outermost.
In this way, the order of rules is respected, both in the wrapping at rule application, and in the `Rule.Handler` handling.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-26 08:01:34 +02:00
Ludovic Orban 45359a063f
disable leak tracking on tests that fail flakily because of leaks (#10566)
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-26 01:55:50 +02:00
Olivier Lamy b945ca6e40
Issue #10421 fix jpms warning (#10424)
* remove wrong jpms declaration

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

* remove non valid jpms sections from mod files

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

* more cleanup

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

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-09-26 09:33:41 +10:00
Simone Bordet f1cd7e0dca
Merge pull request #10576 from eclipse/fix/merge-from-11
Merge from 11 to 12
2023-09-25 18:40:56 +02:00
Ludovic Orban 344c501940 Merge remote-tracking branch 'origin/jetty-11.0.x' into fix/merge-from-11 2023-09-25 17:40:39 +02:00
Ludovic Orban a31ecf654b Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2023-09-25 17:18:36 +02:00
Ludovic Orban 842bbe7fcb
#10557 upgrade quiche to version 0.18.0 (#10570)
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-25 10:11:56 -05:00
Olivier Lamy 49d194db6d
remove wrong directory (#10571)
* remove wrong directory
* fix by using test-classes

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-09-24 00:02:19 +02:00
Jan Bartel 65d5664ef4
Issue #10558 Fix ee10 redirect during forward, add ee9 test (#10560)
* Issue #10558 Fix ee10 redirect during forward, add ee9 test
2023-09-23 03:52:08 +02:00
Joakim Erdfelt 50a1b31a8a
Issue #10547 - Allow Executor of WebSocketClient to be customized via HttpClient (#10548)
* Issue #10547 - Allow Executor of WebSocketClient to be customized via HttpClient

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-09-22 07:08:50 -05:00
Jan Bartel 0e79cc8cb3
Issue #10466 review session documentation. (#10497)
* Issue #10466 review session documentation.

Also fix session config context init param names and add missing code to
configure SessionHandler via context init params, and added test for
config.
2023-09-22 08:18:29 +02:00
Greg Wilkins 57b953be67
Reintroduce an Exception type for invalid UTF-8 (#10553)
Introduce `Utf8CharacterCodingException`  and `Utf8IllegalArgumentException` as a substitutes for the removed `Utf8Appendable.NotUtf8Exception`.

* Updates from review
2023-09-22 12:24:42 +10: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
Greg Wilkins f9ca02c393
ConditionalHandler (#10492)
Added a Conditional Handler

Co-authored-by: Jan Bartel <janb@webtide.com>
2023-09-22 09:25:24 +10:00
Jan Bartel 9bfa5cc65e
Issue #10463 Fix lastModified header when using HttpServletResponseWrapper (#10556)
* Issue #10463 Fix lastModified header when using HttpServletResponseWrapper
2023-09-21 05:49:54 +02:00
Lachlan 42468ae1bd
Merge pull request #10494 from eclipse/jetty-12.0.x-10490-websocketServerUpgradeRequest
Issue #10490 - fixes and testing for websocket JakartaServerUpgradeRequest
2023-09-21 11:46:28 +10:00
Joakim Erdfelt aefa331aa4
Issue #10328 - Review ResourceFactory.newSystemResource (#10533)
* Issue #10328 - Review ResourceFactory.newSystemResource

+ Create a new ResourceFactory.newClassLoaderResource(String, boolean)
+ Make .newSystemResource(String) use it
+ Make .newClassPathResource(String) use it
+ Deprecate .newSystemResource(String)
+ Deprecate .newClassPathResource(String)
+ Adjust own codebase to not use deprecated methods
2023-09-20 16:43:22 -05:00
Lachlan Roberts 665cae2ec2 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-10490-websocketServerUpgradeRequest 2023-09-21 07:24:08 +10:00
Simone Bordet 3dd030ae61
Added WebSocket migration documentation, pointing to existing WebSock… (#10542)
* Added WebSocket migration documentation, pointing to existing WebSocket documentation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-20 21:20:06 +02:00
Simone Bordet d1a1663b39
Fixes #10324 - Improve migration from Servlets to Handler. (#10529)
* Using request.getLength() instead of looking up the Content-Length header.
* Jetty Handler vs Servlet pros.
* Using CompletableFuture (not Promise) in examples.
* Removed unused cruft from tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-20 21:15:20 +02:00
Ludovic Orban e68fd6c16c #10539 fix npe when timeout races with failed completion
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-20 09:37:18 +02:00
Ludovic Orban 5025d7c66c #10382 fix npe when timeout races with successful completion
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-20 09:37:18 +02:00
Ludovic Orban acf59132fd #10382 fix npe when timeout races with normal completion
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-20 09:37:18 +02:00
Joakim Erdfelt 2ad074a7a3
Merge pull request #10531 from eclipse/fix/12.0.x/bundle-copyright-update
Issue #10475 - update Bundle-Copyright
2023-09-19 07:00:46 -07:00
Greg Wilkins 4ae70db8e3
fixed #10513 ContentSourceInputStream close with available (#10525)
Address #10513 ContentSourceInputStream close by making it do a single read looking for EOF
If any content is skipped, then it is an abnormal close.
use Chunk.next in read
2023-09-19 21:25:41 +10:00
Joakim Erdfelt 460fdc60ec
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/12.0.x/bundle-copyright-update 2023-09-18 13:21:53 -05:00
Joakim Erdfelt 43eb08b146
Backport #10540 to `jetty-10.0.x` Fixed deadlock in class initialization. (#10545)
* Fixed deadlock in class initialization. (#10540)

* Thread T1 may initialize HttpTester.Message that extends MutableHttpFields, so grabs the lock for the initialization of class MutableHttpFields.
* Thread T2 may initialize HttpFields, so grabs the lock for HttpFields and initializes field EMPTY, which calls new MutableHttpFields.
* To initialize MutableHttpFields, T1 must initialize HttpFields, but sees that its lock is taken and waits.
* To initialize HttpFields, T2 must create an instance and therefore initialize MutableHttpFields, but sees that its lock is taken and waits.
* Deadlock.

The solution is to use another class, EmptyHttpFields, to initialize HttpFields.EMPTY, so that there is no deadlock.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-18 13:00:11 -05:00
Ludovic Orban a3adb66a7b
Fix checkstyle after 11.0.x merge (#10544)
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-18 11:58:00 +02:00
Simone Bordet 32227570e5
Fixed deadlock in class initialization. (#10540)
* Thread T1 may initialize HttpTester.Message that extends MutableHttpFields, so grabs the lock for the initialization of class MutableHttpFields.
* Thread T2 may initialize HttpFields, so grabs the lock for HttpFields and initializes field EMPTY, which calls new MutableHttpFields.
* To initialize MutableHttpFields, T1 must initialize HttpFields, but sees that its lock is taken and waits.
* To initialize HttpFields, T2 must create an instance and therefore initialize MutableHttpFields, but sees that its lock is taken and waits.
* Deadlock.

The solution is to use another class, EmptyHttpFields, to initialize HttpFields.EMPTY, so that there is no deadlock.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-18 17:37:03 +10:00
Greg Wilkins 09710c7cb6
Fix jetty 12 javadoc (#10527)
Fixes for javadoc warnings
2023-09-18 17:30:02 +10:00
Greg Wilkins 4e27d308df
Fix parsing of JSESSIONID only (#10479)
Improved parsing of JSESSIONID cookies and jsessionid parameters.
Better handling of invalid and duplicate session IDs

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Jan Bartel <janb@webtide.com>
2023-09-18 17:27:28 +10:00
gregw fb80522675 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-09-18 17:25:11 +10:00
gregw 9d96b4fc74 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2023-09-18 16:08:28 +10:00
Greg Wilkins 3c76f82594
Allow session idle timeout to be configured on authentication. (#10511)
Allow session idle timeout to be configured on authentication.

Signed-off-by: gregw <gregw@webtide.com>
2023-09-18 15:53:35 +10:00
Olivier Lamy 057e9eee5e
jetty 12.0.x upgrade dependencies (#10507)
* Junit 5.10.0

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

* slf4j 2.0.9

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

* hazecast 5.3.2

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

* pax exam 4.13.5, pax url 2.6.14

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

* mariadb client 3.2.0

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

* logback 1.4.11

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

* 4.1.97

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

* add exclusions

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

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-09-17 01:17:53 +02:00