Commit Graph

1209 Commits

Author SHA1 Message Date
Ludovic Orban d6c900a783
Fix flaky leaky h2 tests (#10728)
* Fixed more tests that became flaky after #10554.

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-10-13 11:09:30 +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
Ludovic Orban 9275d2acca Made tests relying on TestForbiddenMethodsEventsHandler not flaky
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-10-10 17:09:56 +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
Simone Bordet 7bd6c5211d
Fixes #10679 - Review HTTP/2 rate control. (#10682)
* Bumped the rate control rate from 50 events/s to 128.
* Added rate control for all CONTINUATION frames.
* Added rate control for invalid PUSH_PROMISE frames.
* Added rate control for RST_STREAM frames.
* Added rate control for all SETTINGS frames.
* Fixed growth of header block accumulation buffer.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-09 15:19:00 +02:00
Simone Bordet c41509950b
Fixes #10657 - jetty-http-tools-12.0.1.jar is not well-formed
Added Maven property <bundle-symbolic-name>.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-07 15:14:23 +02:00
Simone Bordet 3608ecf999
Changed default implementation of Session.Listener.onNewStream() and … (#10672)
* Changed default implementation of Session.Listener.onNewStream() and Stream.Listener.onDataAvailable() to auto-discard DATA frames.
For normal cases, these methods are overridden and the application is in full control.
For test cases, these methods may not be overridden and the default implementation conveniently avoids buffer leaks.

Fixed flaky test RawHTTP2ProxyTest.testRawHTTP2Proxy() due to the bad assumption that the first DATA frame ends the stream (so an aggregator is needed), and a copy/paste error in ServerToProxyToClient while processing DATA frames.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-06 14:18:09 +02:00
Simone Bordet ff57574285
Fixed test `FlowControlStrategyTest` after the changes of #10554.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-05 20:08:53 +02:00
Simone Bordet a4b55e6964
Fixed flaky test `StreamResetTest.testResetAfterBlockingWrite()`, that became flaky after #10554.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-05 19:47:28 +02:00
Simone Bordet d8338124ee
Fixed flaky test `GoAwayTest.testServerGoAwayWithStalledStreamServerConsumesDataOfInFlightStream()`, that became flaky after #10554.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-05 18:47:38 +02:00
Ludovic Orban fb3c2a0ebe Disable more flaky tests failing because of buffer leaks
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-10-05 14:44:53 +02:00
Simone Bordet 53de4c8298
Fixes #10611 - Flaky StreamResetTest.testClientResetConsumesQueuedData() (#10655)
Fixed test case that was racy.
When the DATA frames arrived at the server before the call to consumeAvailable(), they were read and the client flow control window re-opened.
If it happened that the DATA frames arrived at the server after the call to consumeAvailable(), the client flow control window was not re-opened, making the test flaky.
Fixed by avoiding the race in the test.

Added over-release buffer tracking, add leak tracking to H2 tests, fix client leaks in tests.

Also reviewed the places that required re-opening of the flow control window in case the DATA frames are not read.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2023-10-04 14:47:26 +02:00
Lachlan Roberts a56faad195 Issue #10333 - save the value of Request.getTimeStamp so it returns consistent value.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-10-04 09:42:37 +11:00
Greg Wilkins 8331809c40
Fix getCharacterEncoding issue with #10563 (#10650)
Do not persist a defaulted charset used in the request.
Throw `UnsupportedEncodingException` from `getReader`
2023-10-03 12:45:40 +11:00
Simone Bordet 27865d29b4
Fixed NPE introduced by #10618.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-02 15:53:40 +02:00
Simone Bordet 0981c22c33
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-01 22:48:58 +02:00
Ludovic Orban 5b1c0b8704
Reduced mildly expensive HttpMethod.is calls by reordering boolean logic (#10618)
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-29 17:51:10 +02:00
Greg Wilkins 9ce414125d
Fix incorrect call to super in BufferedResponseHandler (#10613)
Also cleaned up needless super call in Server
2023-09-28 16:16:44 +02:00
Lachlan aa880cff09
Issue #10513 - fix multipart lockup with HTTP/2 (#10554)
* Changes the H2 semantic of `Stream.readData()` so that it is `readData()` that enlarges the flow control window, and not anymore the release of the `Stream.Data`.
This allows applications to buffer in memory by retaining the `Stream.Data` instances more than the H2 flow control window.
* Updated `FlowControlStrategyTest` after `Stream.readData()` semantic changes.
* Updated `DataDemandTest` after `Stream.readData()` semantic changes.
* Updated documentation.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: gregw <gregw@webtide.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2023-09-28 11:47:32 +02:00
Simone Bordet 5be34089ef
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-28 11:41:34 +02:00
Ludovic Orban ffb00fd7f1 #10543 handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-27 16:44:35 +02:00
Ludovic Orban 56eadabbfb #10543 align buffer releasing in all streams' consumeAvailable() implementations
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-27 16:44:35 +02:00
Ludovic Orban 70d333f376 #10543 align buffer releasing in all streams' consumeAvailable() implementations
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-27 16:44:35 +02:00
Ludovic Orban 5ffbf523d7 #10543 use var instead of fully qualified class name
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-27 16:44:35 +02:00
Ludovic Orban aab665d7e1 #10543 make sure HttpConnection always releases its retainable buffer when needed
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-27 16:44:35 +02:00
Ludovic Orban e290ff9561 #10543 re-instate H3 fix as temporary
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-27 16:44:35 +02:00
Ludovic Orban d03fc25b9c #10543 release buffer when fill returns -1
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-27 16:44:35 +02:00
Ludovic Orban b9f1fb3187 #10543 make sure drainClearBytesForStream() returns -1 instead of throwing when the stream is finished to avoid a stack overflow
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-27 16:44:35 +02:00
Ludovic Orban 5c9d796a49 #10543 handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-27 16:44:35 +02:00
Ludovic Orban b25dc8183b #10543 handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-27 16:44:35 +02:00
Ludovic Orban 1286f91b1c #10543 record failure as chunk to avoid consumeAvailable to stack overflow
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-27 16:44:35 +02: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
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
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
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
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
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
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
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 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
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
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
Joakim Erdfelt dfd82a01d4
Issue #10500 - preserve request header quoting when accessed through `JettyHttpExchangeDelegate` (#10503)
* Issue #10500 - preserve request header quoting when accessed through JettyHttpExchangeDelegate
* improve test cases with quoted-pair feature in RFC
* add skip of value lists on specific headers known to not have value lists
* Remove URL usage
* Changes from review
2023-09-15 16:54:09 -05:00
Simone Bordet f47cc15724
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-15 09:27:48 +02:00
Jan Bartel 26fdbe3280
Issue #10474 support application/json for ErrorHandler (#10504) 2023-09-15 03:12:48 +02:00
Simone Bordet 08190e1a50
Fixes #9665 - HttpCookieStore incorrectly rejects cookies for domains that are an IPv6 address (#10465)
* Refactored domain checks into overridable method.
* Added support for IPv6, and clarified domain checks.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-14 19:27:18 +02:00
Simone Bordet 530ed33611
Fixes #10219 - Review HTTP Cookie parsing (#10464)
* Added SetCookieParser interface and RFC6265SetCookieParser implementation to properly parse Set-Cookie values.
* Removed hacky implementation in HttpClient.
* Removed unused methods in HttpCookieUtils.
* Using SetCookieParser for the implementation of newPushBuilder in ee9,ee10.
* Reworked HttpCookieStore.Default implementation.
* Implemented properly cookie path resolution.
* Using URI.getRawPath() to resolve cookie paths.
* Removed secure vs. non-secure scheme distinction when storing cookies.
* Refactored common code in HttpCookieStore.Default to avoid duplications.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-14 17:13:05 +02:00
Simone Bordet 388d3e38fa
Fixes #10361 - Introduce QoSHandler (#10480)
* Introduced QoSHandler.
* Updated documentation, and removed old documentation.
* Now using dynamic max priority.
The current implementation retains priorities and queue as they are created, but hopefully the priority range is constrained.
* Better algorithm for resuming: rather than releasing a permit and try to acquire it again, keep the permit and resume a request.
This also removes the issue that a request could have been suspended again, therefore remaining suspended much more than maxSuspend.
* Deprecated QoSFilters in ee10 and ee9.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-14 15:46:12 +02:00
Simone Bordet 8684b0a67a
Introduced CompletableResponseListener (#10502)
Introduced CompletableResponseListener, a replacement for FutureResponseListener that uses better APIs based on CompletableFuture.

Deprecated FutureResponseListener and replaced its usages.

Updated documentation.

Added tests for zipped request content.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-14 15:33:51 +02:00
Lachlan Roberts 4bdd21f777 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-10490-websocketServerUpgradeRequest 2023-09-14 09:57:50 +10:00
Simone Bordet 85c72720fc
Fixes #10442 - Reduce verbosity when JMX finds overloaded setter (#10443)
Now the log statement is only emitted when there is no matching setter method, but a mismatched one exists.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-13 15:17:22 +02:00
Jan Bartel 4bbfa3949b
Issue #10440 fix ClassCastException for <jettyEnvXml> in maven plugin (#10493)
* Issue #10440 fix ClassCastException for <jettyEnvXml> in maven plugin

* disable H1 client leak tracking for testInputStreamContentProviderThrowingWhileReading

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

---------

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2023-09-12 07:49:45 +02:00
Ludovic Orban 022c99cd24 #10226 handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-11 11:47:04 +02:00
Ludovic Orban cb68dc92c3 #10226 fix buffer leak in consumeAvailable() when HttpStream.consumeAvailable() leaves unconsumed content
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-11 11:47:04 +02:00
Ludovic Orban 8b3db91174 #10226 only release the buffer when it could not be propagated to a Content.Source reader
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-11 11:47:04 +02:00
Ludovic Orban 499816f79c #10226 fix HTTP consumeAvailable() buffer leak and re-enable tests
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-11 11:47:04 +02:00
Lachlan Roberts 3066737016 Issue #10490 - fixes and testing for websocket JakartaServerUpgradeRequest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-09-11 17:00:02 +10:00
Joakim Erdfelt a415da73df
Merge remote-tracking branch 'origin/jetty-11.0.x' into fix/12.0.x/merge-from-11 2023-08-31 16:06:14 -05: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
Simone Bordet c638753b8d Fixes #10293 - Improve documentation on how to write a response body in Jetty 12.
Updated documentation about:
* Content.Source
* Content.Sink
* Handler
* Request/Response

Updated few APIs to make easier to write applications.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-29 22:07:42 +02:00
Greg Wilkins d3cd69be68
Fix #10411 default environment (#10415)
Implemented a simpler default environment algorithm where an application that does not specify an environment is always attempted in the default.

Updated documentation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-29 18:34:21 +02:00
Ludovic Orban 67ecd9f4a3 #9900 handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 17:11:07 +02:00
Ludovic Orban 4757333ed5 #9900 accurate implementation of Request.getBeginNanoTime() for FCGI
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 17:11:07 +02:00
Greg Wilkins d6a0226866
Fix #9169 refine idle timeout and failure (#10418)
Only fail request callback if a failure has not been otherwise notified.
Slight optimisation for failing idle timeouts by avoiding double lock.
Always create a failure if failing the callback.
2023-08-29 20:44:40 +10:00
Ludovic Orban 155137605a #10226 disable client leak tracking for H1 transports
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Ludovic Orban 8ae62e3a95 #10226 disable client leak tracking for all transports
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Ludovic Orban f3a21cec6f #10226 fix heap dump
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Ludovic Orban 159238471b #10226 handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Ludovic Orban a4e33a019f #10226 disable leak tracking only for client/server or impacted transports
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Ludovic Orban 18797fad57 #10226 add ability to disable leak tracking and disable currently known leaky threads
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Ludovic Orban 44aa6036b3 #10226 assert using awaitility and fix heap dump cleanup when a leak is detected
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Ludovic Orban 01f8812dbb #10226 improve testDownloadWithCloseMiddleOfContent debuggability by helping to discriminate the buffers by their content
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Ludovic Orban eece4b0fde #10226 dump the heap when a buffer leak is detected
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Ludovic Orban 83ee6387b8 #10226 improve Tracking.Buffer dump
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Ludovic Orban 174c59e9a1 #10226 assert using awaitility
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Ludovic Orban bbb994f96d #10226 improve ArrayByteBufferPool.Tracking
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Ludovic Orban 2fcccef0c4 #10226 fix GZIPContentDecoder buffer leak of zero-capacity buffers
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Ludovic Orban 7083fa3927 #10226 restore leak tracking in tests
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-08-29 09:58:39 +02:00
Greg Wilkins e3ee84a5ad
Fix #10416 Do not copy ee9 response headers (#10417)
Use the core response HttpFields directly as the ee9 response headers to avoid copy and retain persistent field behaviour.
Fix #10416 EE9 Response headers
Added EE9 test to show that Persistent fields can be modified
Updated fix for #10339 so that persistent fields revert to original values after a clear operation
2023-08-29 08:31:02 +10:00
Simone Bordet 5a8c5bc8c7
Fixes #10353 - Questions about porting WebSocket APIs to jetty-core 12 (#10354)
* Added direct WebSocket upgrade in the Jetty core WebSocket APIs.
* Updated the WebSocket documentation.
* Optimized WebSocketMappings.getMatchedNegotiator() to avoid allocating a lambda for every invocation.
* Cleaned up core.server.WebSocketUpgradeHandler.
* Expanded websocket docs to mention how the demand mechanism works.
* Fixed code examples with correct demand handling.
* Javadocs for api.Callback.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-28 17:46:12 +02:00
Simone Bordet 2bf25969a0 Improved Handler javadocs.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-26 12:32:47 +02:00
Greg Wilkins 8ed56b3466
Implement containsLast in HttpFields (#10340)
Fully implement list iterator so that we can efficiently check for the last item in a multi header list.

---------

Signed-off-by: gregw <gregw@webtide.com>
2023-08-26 10:05:29 +10:00
Simone Bordet eeee3ca8ac
Added well-known HTTP/3 servers.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-25 15:33:46 +02: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 67404f96ce use HttpStatus for 413 and 500 codes in SizeLimitHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-25 16:24:31 +10:00