Commit Graph

18270 Commits

Author SHA1 Message Date
Lachlan Roberts 2d5da1fa35 StatisticsHandler should still return 503 responses on shutdown
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-25 10:34:59 +10:00
Lachlan Roberts 8faa71818f change addToAllConnectors method to addBeanToAllConnectors
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-25 10:22:18 +10:00
Greg Wilkins 1159fa399f
Issue #5095 - XmlConfiguration Parser Pool (#5148)
* Issue #5095 XmlConfiguration Parser Pool

Use a pool of parsers rather than a shared static

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Updates from review

* Updates from review
Tests for cache size and acquire with creator

* Method no longer required with Reservation

* update from the feedback on the feedback of the feedback from the review.

Moved enable to Entry, removed Reservation class and clarified usage in javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

* removed fake test

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

updates from review
2020-08-24 18:00:28 +02:00
Jan Bartel f143babcf7
Issue #5087 Use lock to protect Deployment Mgr startup errors (#5139)
* Issue #5087 Use lock to protect Deployment Mgr startup errors

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-08-24 17:21:53 +02:00
Lachlan Roberts c0268c590f change name of waitForSuspendedRequestsOnShutdown to asyncGraceful
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-24 16:19:59 +10:00
Lachlan Roberts 65c4e86bdb Issue #3974 - disable testAfterContentTransformerOverflowingToDisk()
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-24 15:24:58 +10:00
Simone Bordet 0af5f676cd Issue #5147 - HTTP2 RoundRobinConnectionPool with maxUsage
Reworked HTTP/2 release after an exchange is terminated.

Previously, the release was bound to 2 events: onStreamClosed(),
introduced for #2796, and exchangeTerminated().
Unfortunately, if the former happens before the latter and
closes the connection, the latter will see the exchange as
aborted, while in fact it was successful, causing what
reported in #5147, an AsynchronousCloseException.

Now, the release is always performed by the exchangeTerminated()
event. With respect to #2796, the stream is always already
closed by the time the exchangeTerminated() event fires (it
was not before).

Reworked the implementation of RoundRobinConnectionPool using
a lock and aggressively trying to open new connections.

A second fix is related to HttpDestination.release(Connection).
If the connection is closed for e.g. overuse, we need to trigger
the processing of queued requests via send(create: true).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-22 22:10:08 +02:00
Simone Bordet 2d3f0e0c10 Improved logging and toString() implementations,
small refactorings in code and tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-22 17:31:12 +02:00
calvincodes 353265c2fc Adding Injecting Handler section to documentation.
Signed-off-by: calvincodes <arpitjain1821@gmail.com>
2020-08-21 04:10:47 -07:00
Lachlan Roberts 623d1be7c7 Change the way ConnectorStatistics is added to the Servers Connectors
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-21 15:45:58 +10:00
Lachlan Roberts 70a679f5f4 reorder some CustomRequestLog methods to be same as jetty-10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-21 10:29:22 +10:00
Lachlan b19de0aec3
Merge pull request #5176 from eclipse/jetty-9.4.x-CustomRequestLogCleanup
cleanup various warnings and TODOs in CustomRequestLog
2020-08-21 10:23:29 +10:00
Lachlan Roberts 12381e9cf5 cleanup various warnings and TODOs in CustomRequestLog
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-20 12:02:00 +10:00
Lachlan Roberts 0fae221afa Issue #5105 - fix GracefulStopTest expectations from 503s to 404s
StatisticsHandler no longer gives 503 responses after shutdown.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-20 07:27:12 +10:00
Lachlan Roberts a65f00156d Issue #5105 - add optional configuration to not wait for suspended requests in StatisticsHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-20 07:27:12 +10:00
Lachlan Roberts 32358b1b77 Issue #5105 - fix StatisticsHandler bug with async dispatched requests
If the request is async dispatched, the check state.isSuspended() is not
correct to determine if the request was async or not. The check
state.isAsyncStarted() should be used instead.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-20 07:27:12 +10:00
Thomas Draebing a46ed5b5f0 Also manage graceful shutdown of already started async requests
Signed-off-by: Thomas Draebing <thomas.draebing@sap.com>
2020-08-19 09:59:21 +02:00
Lachlan Roberts 37a8e44347 fix WebSocketStatsTest numMessages back to 1000
Remove server getConnections check after client open event
as the server connection may not be open yet.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-19 09:36:56 +10:00
Lachlan cfd31b2cf5
Merge pull request #5125 from eclipse/jetty-9.4.x-5122-WebSocketStats
Issue #5122 - Improve connection statistics for WebSocket
2020-08-19 08:04:47 +10:00
Simone Bordet c88aba6587 Fixes #5152 - HttpClient should handle unsolicited responses.
Now closing the connection if an unsolicited response is detected,
no matter what response status code, or whether it has a
Connection: close header, or whether it's just random bytes from
the server, and also no matter whether the client read -1.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-18 12:18:20 +02:00
Simone Bordet 0646e4d0b5 Fixes #5165 - Wrong messagesIn count for HttpClient.
Now incrementing inMessages only when the response is complete.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-18 11:41:18 +02:00
olivier lamy ff3ebeff54 add dependabot for 9.4.x branch
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-08-18 14:08:28 +08:00
Lachlan Roberts c37d902ef7 remove tri-state logic from IncludeExcludeConnectionStatistics
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-18 10:18:44 +10:00
Olivier Lamy 2d9fcf20ea
upgrade some maven plugins version (#5143)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-08-15 10:32:01 +10:00
Simone Bordet a6e1f9df8f
Merge pull request #5151 from olegmoz/5150-zero-connection-timeout
Issue #5150 - Infinite connection timeout support in ManagedSelector
2020-08-14 18:32:52 +02:00
Lachlan Roberts 1663a6d7af Issue #5125 - Generalise WebSocketConnectionStatistics into IncludeExcludeConnectionStatistics
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-14 15:19:06 +10:00
Oleg Mozzhechkov 32fe19a5e0 #5150 - Code style fix and connect timeout docs update
Signed-off-by: Oleg Mozzhechkov <oleg.mozzhechkov@gmail.com>
2020-08-13 21:23:31 +03:00
Simone Bordet edbc1930b9 Issue #4809 - Set a max number of requests per connection.
Added test case for idle connections not used for any request.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-13 19:39:27 +02:00
Simone Bordet 51d0780041 Issue #5104 - AbstractProxyServlet include incorrect protocol version in Via header when accessed over H2.
Fixed HttpFields.computeField() removal loop.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-13 18:23:26 +02:00
Simone Bordet 26c2d34439 Issue #4809 - Set a max number of requests per connection.
Improved Pool.reserve(int) logic to take into account the
fact that an entry can accommodate maxMultiplex acquires.

This reduces connection openings for HTTP/2 in case of
spikes of requests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-13 16:52:06 +02:00
Oleg Mozzhechkov bffd6a2c0f #5150 - Infinite connection timeout support in ManagedSelector
Signed-off-by: Oleg Mozzhechkov <oleg.mozzhechkov@gmail.com>
2020-08-13 17:36:16 +03:00
Joakim Erdfelt e7a07074f5
Setting DemoBaseTest.testAsyncRest() as @Tag("external")
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-13 08:42:44 -05:00
Simone Bordet 1b3cb2ea8d
Merge pull request #5144 from eclipse/jetty-9.4.x-5104-incorrect_via_header
Jetty 9.4.x 5104 incorrect via header
2020-08-13 14:22:18 +02:00
Simone Bordet 7b3dccc1bf Issue #5104 - AbstractProxyServlet include incorrect protocol version in Via header when accessed over H2.
Added HttpFields.computeField() for HttpHeader too and updated usages.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-13 11:50:43 +02:00
Simone Bordet c3598e814b Merged branch 'jetty-9.4.x-5104-incorrect_via_header-2' into 'jetty-9.4.x-5104-incorrect_via_header'. 2020-08-13 11:33:50 +02:00
Greg Wilkins a933b1645c simplified loops
unmodifiable found list

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-08-13 11:27:37 +02:00
Greg Wilkins f31604cff2 added test. Fixed bugs
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-08-13 11:17:19 +02:00
Simone Bordet faea7c9ac1 Fixes #5104 - AbstractProxyServlet include incorrect protocol version in Via header when accessed over H2.
Fixed javadocs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-13 11:05:38 +02:00
Greg Wilkins f1a13521df improved implementation
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-08-13 10:06:31 +02:00
Simone Bordet 79d340fdb6 Fixes #5104 - AbstractProxyServlet include incorrect protocol version in Via header when accessed over H2.
* Introduced HttpFields.computeField() to put/append header values.
* Reworked AbstractProxyServlet.addViaHeader().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-13 00:08:52 +02:00
Joakim Erdfelt 9b5b43a2fd
Fixing KeyStoreScannerTest
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-12 15:50:11 -05:00
Joakim Erdfelt e632d2454b
Merge pull request #5131 from eclipse/jetty-9.4.x-5129-extraclasspath-glob
Issue #5129 - WebAppContext.setExtraClasspath(String) cleanup
2020-08-12 10:08:53 -05:00
Joakim Erdfelt e1e8e50112
Merge pull request #5130 from eclipse/jetty-9.4.x-remove-overlay-deployer
Remove long dead jetty-overlay-deployer module
2020-08-12 10:04:43 -05:00
Travis Spencer b2ab05c44a Issue #5104 - Fix protocol version in Via header to work with H2 and other protocols
Signed-off-by: Travis Spencer <travis@curity.io>
2020-08-12 16:55:34 +02:00
Simone Bordet 4a0af046b8 Closes #4809 - Set a max number of requests per connection.
Implemented as part of #4975.

Added a test case that proves that the connection is closed
when the max usage count is reached.

Improved logging.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-12 16:14:51 +02:00
olivier lamy 3c6c5075f8 fix missing SslContextFactory
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-08-12 18:51:39 +08:00
Greg Wilkins 25e3f1c1e0
Pool class refinements (#5117)
* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Updates from review

* Updates from review
Tests for cache size and acquire with creator

* Method no longer required with Reservation

* update from the feedback on the feedback of the feedback from the review.

Moved enable to Entry, removed Reservation class and clarified usage in javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

fixed javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

fixed javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

fixed javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

updates from review
2020-08-12 11:27:25 +02:00
olivier lamy bc185e3cae use https for external call
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-08-12 09:48:33 +08:00
Olivier Lamy 12667497e1
Jetty 9.4.x surefire 3.0.0 m5 (#5136)
* test surefire 3.0.0-M5

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* simplify code to avoid some timeout

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-08-12 10:27:12 +10:00
Simone Bordet f73b282050
Merge pull request #5128 from eclipse/jetty-9.4.x-5079-ipv6_brackets
Fixes #5079 - :authority header for IPv6 address not having square br…
2020-08-11 20:04:46 +02:00