Commit Graph

928 Commits

Author SHA1 Message Date
Steffen Nießing 5d87ea7254
Fix spotbugs packages (#9929)
* Fix spotbugs packages

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

* remove jdk17 profile which disable spotbugs

---------

Signed-off-by: Steffen Nießing <zuniquex@protonmail.com>
Co-authored-by: Olivier Lamy <olamy@apache.org>
2023-06-20 10:54:16 +10:00
Lachlan 2a683e7774
Merge pull request #9916 from eclipse/jetty-12.0.x-PR9903-Merge
Merge PR #9903 to Jetty-12 (PerMessageDeflateExtension callback completion)
2023-06-16 14:23:22 +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
Lachlan Roberts 5d4fa756a0 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-06-16 08:11:28 +10:00
Lachlan Roberts c70b940751 prevent potential NPE from StartArgs
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-06-16 07:46:32 +10:00
Lachlan 58cee22ba4
Merge pull request #9908 from eclipse/jetty-12.0.x-PR9891
Merge PR #9891 to Jetty-12
2023-06-16 07:24:38 +10:00
Ludovic Orban 8e79c1b58b
Add `EventsHandler` API (#9901)
* #8885 add EventsHandler API

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-06-15 17:31:11 +02:00
Lachlan Roberts 48367f3baf Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-06-15 13:56:28 +10:00
Jan Bartel 4e316dbf62
Jetty 12.0.x ee9 serverpush tck (#9902)
* Make a test case to resemble a failing tck test

* Add more test cases more like the tck test

* Fixed processing of EOF frames for pushed requests.

Before, the EOF frame was not added to the HTTP2Stream queue.
When the pushed request was completing it tried to consume the available content, but it was not finding EOF and so was emitting a reset frame, causing the TCK failure.

Now the EOF frame is always added to the HTTP2Stream queue, so it is properly consumed when completing the pushed request.

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

* Fix H2 trailers frames

Signed-off-by: Ludovic Orban <lorban@bitronix.be>

---------

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2023-06-14 14:22:45 +02:00
Greg Wilkins 963d33111e
Jetty 12 idletimeout (#9905)
* IdleTimeout review

 + pass TimeoutException through all APIs
 + HttpConnection now passes on TimeoutException to HttpChannel.onFailure
* More ServerTests for idletimeout

* Recreated a ServerTimeoutsTest for multiple transports

* more robust tests

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

* merged work from @sbordet and @gregw

* Various improvements to CyclicTimeouts.
* Improved reset of the earliest timeout before iteration.
* Removed check for getExpireNanoTime() == -1, since it's a valid value.
* When onExpired(Expirable) returns false, the Expirable should arrange to move its timeout in the future.

* fix keystore to please BoringSSL + use correct temp path

Signed-off-by: Ludovic Orban <lorban@bitronix.be>

* Fixed ErrorResponseAndCallback succeeded() and failed() to call super.failed() in all cases to complete the wrapped callback.

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

* Revert "Fixed ErrorResponseAndCallback succeeded() and failed() to call super.failed() in all cases to complete the wrapped callback."

This reverts commit 5ac57c13e0.

* WIP idleTimeout

* WIP idleTimeout

* Added context wrapper for idle timeout listener

* updates from review

---------

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2023-06-14 09:57:10 +02:00
Greg Wilkins d3e88a95fe
Jetty 12.0.x custom request log #8819 (#9896)
* Resolve #8819 CustomRequestLog improvement

Resolves #8819 CustomRequestLog improvements:
 + only add extra detail if the log is a CustomRequestLog
 + add extra detail as a record
 + get authentication state directly from request attribute

* protect against null core request

* protect against null core request

* Use nanotime for logged latency
2023-06-13 11:12:45 +02:00
Simone Bordet 601bd687aa
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-06-11 19:12:59 +02:00
Simone Bordet 0a9bbde6d0
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-06-11 19:09:02 +02:00
Simone Bordet df24485000
Various improvements to CyclicTimeouts. (#9897)
* Improved reset of the earliest timeout before iteration.
* Removed check for getExpireNanoTime() == -1, since it's a valid value.
* When onExpired(Expirable) returns false, the Expirable should arrange to move its timeout in the future.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-06-10 17:02:37 +02:00
Ludovic Orban d5200c6c63 #9881 add thread-safety documentation
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-06-08 23:55:30 +02:00
Ludovic Orban 9547104163 #9881 handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-06-08 23:55:30 +02:00
Ludovic Orban b97090a6b4 #9881 manually maintain the size to avoid calling ConcurrentLinkedQueue.size()
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-06-08 23:55:30 +02: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
Greg Wilkins c2dc87c039
Jetty 12 #9630 dumpable context (#9885)
* Fix #9630 dumpable context

Added DumpableAttributes utility class

* fixed test format

* Updates from review
2023-06-08 21:14:04 +02:00
Jan Bartel 4ec7dc73f6
Jetty 12.0.x 9072 move core ee classes (#9883)
* Issue #9072 refactor jetty-ee module to remove it

* Remove old ee imports in module-info.javas

* Remove jetty-ee from deps

* Fix references to jetty-ee for osgi

* Update jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Deployable.java

Co-authored-by: Greg Wilkins <gregw@webtide.com>

---------

Co-authored-by: Greg Wilkins <gregw@webtide.com>
2023-06-08 18:22:57 +02:00
Greg Wilkins c0de62b2c6
Jetty 12 graceful contexts (#9867)
Removed all shutdown mechanisms from ContextHandler
Fixed GracefulHandler

---------

Signed-off-by: gregw <gregw@webtide.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2023-06-07 21:05:49 +02:00
Greg Wilkins a44a99ad9b
SetCookieHttpField #9173 (#9789)
Added utility methods and classes to allow for efficient interception of a Set-Cookie header in a HttpStream wrapper.
2023-06-07 13:50:19 +02:00
Simone Bordet 714d2a4ac9
Fixed Environment.Named.toString().
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-06-07 00:11:21 +02:00
Simone Bordet 4e6575b994
Fixes #8033 - Jetty-12 already completed exception in http2.tests.MaxConcurrentStreamsTest.
Fixed by the work done in #9684.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-06-06 20:31:35 +02:00
Ludovic Orban 4456f99de7 H3: release the buffer when the stream is closing
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-06-06 18:25:14 +02:00
Ludovic Orban 15d67bdf57 H3: disable using an IP(v4 or v6) address as the hostname as BoringSSL requires a SAN dns attribute for the IP addresses that keytool refuses to create
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-06-06 18:25:14 +02:00
Ludovic Orban ea7369b769 H3: fix interim responses
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-06-06 18:25:14 +02:00
gregw dfca108603 Update test 2023-06-06 09:33:27 +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
Greg Wilkins 1c01a49149
Jetty 12 context initial ClassLoader (#9866)
* Ensure environment classloader in ContextHandler
* Set the initial classloader in ContextHandler
* WebAppContext uses initial classloader
2023-06-05 16:49:15 +02:00
Ludovic Orban 0abba456ac Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-06-01 10:30:35 +02:00
Ludovic Orban 64b4d60246 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-05-31 11:49:24 +02:00
Ludovic Orban cfc5c58bdb fix merge that missed setting the truststore and updating a test keystore
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-05-29 10:55:47 +02:00
Lachlan Roberts 9acd5e83dc Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-05-29 16:47:59 +10: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
Simone Bordet 476145b817
Fixed FCGI content parsing. (#9790)
* Fixed FCGI content parsing.

WordPress sends the initial content in the same frame as the response headers.
StreamContentParser was receiving the frame, delegating to HttpParser to parse the headers,
but the buffer was still containing some content, that was lost.
Now the content after the headers is correctly retained.

For the direct FastCGI APIs, now a read-only version of the buffer is passed to the listener,
and the original buffer is consumed as the caller expects.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-25 15:22:30 +02:00
Simone Bordet e0ff8cd1a5
Simplified and fixed TryPathsHandler. (#9792)
Improved logging and variable naming in related classes.

Previously, a 404 received from a child handler would have resulted in an infinite loop trying to write the 404 response. However, `TryPathsHandler` should just delegate to other handlers.

Replaced the `IteratingCallback` loop with a simple `for` loop over the paths to try, returning if the path was handled by a child `Handler`.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-23 21:26:35 +02:00
Ludovic Orban ece6adbd33 #9765 fix race condition that can happen when one thread demands and another thread reads
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-05-23 19:17:39 +02:00
Lachlan Roberts 152030de09 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-05-22 18:05:21 +10:00
Greg Wilkins 18c4846b1c
Jetty 12 simplify EchoHandler (#9783) 2023-05-18 09:50:09 +02:00
Greg Wilkins 068a60a868
Simplified QuotedStringTokenizer (#9729)
Simplified QuotedStringTokenizer #9729
* Now implements a simple subset of `quoted-string` from RFC9110
* introduced builder
* Extracted QuotedStringTokenizer interface and re-introduced the legacy implementation
* Re-introduced the ability to have unescaped \ in filenames
* Whitespace is Character.isWhiteSpace
* Disable test pending RFC8187
* No OWS around =
2023-05-18 08:25:53 +02:00
Simone Bordet eaeb633fbe
Fixed flaky test ClientServerTest.testReadDataFromOnRequestWithoutDemanding().
Removed assumption that returning a null stream listener implies that the stream input must be shut down,
because the reads may be performed in a spin loop in another thread, without demanding.

Rewritten the test to avoid blocking the thread that called onRequest(), otherwise the data frames cannot
be read from the network.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-17 22:57:23 +02:00
Simone Bordet e52e95f788
Fixes #9766 - jetty-12 ee9 ServerPush failures. (#9776)
* Restored dispatch=true for pushed requests.
* Restored tests that use the Servlet APIs to push.
* Ensured that pushed streams have request content EOF.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-17 15:42:05 +02:00
Simone Bordet 7bbf966949
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-15 16:48:06 +02:00
Simone Bordet b884469103
FCGI improvements. (#9733)
* FCGI improvements.

* Better handling for HTTPS parameter on server side.
* Better handling of unknown frame types.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-15 15:04:50 +02:00
Ludovic Orban ac2765c98d Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-05-15 10:09:36 +02:00
Joakim Erdfelt 2fdcae40f0
Refine how Request / Channel / Stream completion works (#9684)
Fixes #9684
+ Restore LargeHeaderTest Test
+ Fix Bad Content-Length produced if write + error occurs
+ Fix race between callback failure and error handling failure
+ Introduce new ResponseCompleteTest to attempt to capture complete race issue
+ More DEBUG + ignoring failure for completeStream
+ Removed ErrorResponse in favour or an errorMode

---------

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: gregw <gregw@webtide.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-15 08:15:37 +02:00
Greg Wilkins 4b67abcf38
Jetty 12 immutable ee10 configurations (#9724)
* Immutable EE10 Configurations
2023-05-13 08:17:42 +02:00
Ludovic Orban ef0f7a06e1 #9680 prevent AttributeNormalizer from accepting combined resources
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-05-12 18:34:41 +02:00
Jan Bartel 2261ce9a50
Issue #9762 ee9 double parses cookies (#9764)
* Issue #9762 ee9 double parses cookies

* implemented the TODOs to cache servlet cookies

---------

Co-authored-by: gregw <gregw@webtide.com>
2023-05-12 17:14:44 +02:00