Commit Graph

1421 Commits

Author SHA1 Message Date
Simone Bordet 03b2b97751 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-12-01 12:58:18 +01:00
Simone Bordet eb00ac2dde Restored first-close-and-remove-then-notify ordering that was changed with the changes for #5310.
This is important in tests that check that streams have been removed from sessions after counting down a latch in the notification.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-12-01 12:55:23 +01:00
Ludovic Orban 1092085c8d merge branch jetty-9.4.x into jetty-10.0.x
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-11-30 18:49:37 +01:00
Ludovic Orban df3a32601a reduce test load on jenkins
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-11-30 18:36:00 +01:00
Simone Bordet 8c465ac76d Fixed tests and code after merge of #5310 from 9.4.x.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-27 13:53:06 +01:00
Simone Bordet ce4bb35e97 Fixed failAllData() logic to return true if the stream is already remotely closed.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-27 13:45:28 +01:00
Simone Bordet a241b9dd5e Improved logging.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-27 13:43:09 +01:00
Simone Bordet c85cef4da5 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-26 16:36:14 +01:00
Ludovic Orban aa8bd5d820 replace Trie interface and impls usage with new *Index interfaces and Builders
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-11-26 14:14:16 +01:00
Simone Bordet 68e70b47de
Merge pull request #5634 from eclipse/jetty-9.4.x-5310-http2_goaway
Review HTTP/2 GOAWAY handling
2020-11-26 11:29:44 +01:00
gregw 7646a24828 Accidentally committed 2020-11-25 23:02:26 +01:00
Joakim Erdfelt a133e195d8
Fixing checkstyle violations
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-11-24 13:36:25 -06:00
gregw 0a70cba8ae Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: gregw <gregw@webtide.com>
2020-11-24 18:36:24 +01:00
Joakim Erdfelt e8683cba9f Updating to version 9.4.36-SNAPSHOT 2020-11-20 16:05:27 -06:00
Joakim Erdfelt bdc54f03a5 Updating to version 9.4.35.v20201120 2020-11-20 15:05:50 -06:00
Olivier Lamy 33f413b37a
Jetty 10.0.x surefire upgrade and no skip errors (#5438)
* fix apacheds version

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

* get some logs

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

* more debug

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

* testing surefire M5

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

* already part of the classpath

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

* add slf4j-simple to get logs

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

* execute full build

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

* no need to add jmx module

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

* use h2spec-reports

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

* h2 spec tests are too flaky

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

* debug

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

* touch trigger build

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

* not trim stacktrace per default and a bit more memory for test

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

* disable embedded jmx test

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

* nit

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

* no junit files for javadoc

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

* fix dependency version

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

* fix missing dependency with surefire M5...

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

* remove debug

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

* fix some upperbound dependency

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

* fail quickly

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-11-18 21:26:38 +10:00
Simone Bordet 4093af1824 Issue 5310 - Review HTTP/2 GOAWAY handling.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-18 12:03:35 +01:00
Simone Bordet 1d71cabef4 Fixed test that was failing due to TLS 1.3 backport to Java 8.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-17 13:39:28 +01:00
Simone Bordet dd9bdc7ac3 Fixes #5633 - Allow to configure HttpClient request authority.
Updated after review.
Added more tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-12 17:13:36 +01:00
Simone Bordet 96e4b38624 Fixes #5633 - Allow to configure HttpClient request authority.
Fixed initial session recv window update: it was wrong if the initial value was less than the default value (65535).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-12 17:13:17 +01:00
Joakim Erdfelt 9e22260377
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-11-10 12:12:39 -06:00
Simone Bordet 298ddfd722 Issue 5310 - Review HTTP/2 GOAWAY handling.
Fixed javadocs and TODOs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-10 17:38:05 +01:00
Simone Bordet a02012fb3e Issue 5310 - Review HTTP/2 GOAWAY handling.
Fixed logic in onShutdown(): in case of abort the closing action must be
run as callback, so it executes at the end of all the other callbacks.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-10 16:17:32 +01:00
Simone Bordet 1de622f72f Issue 5310 - Review HTTP/2 GOAWAY handling.
Updates after initial review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-10 15:25:44 +01:00
Simone Bordet 226d616a8a Issue 5310 - Review HTTP/2 GOAWAY handling.
Reimplemented close/idle_timeout/stop/onGoAway/input_shutdown following more closely the specification.

In particular, the semantic of sending a GOAWAY is now to:
* stop creation of new both local and remote streams
* record the last processed stream
* continue processing streams that are pending

This means that a GOAWAY is "graceful" in the sense that it allows for streams to be completed by applications.

The semantic of stop() and idle timeout is harsher: for pending streams a RST_STREAM is sent to the other peer and they are failed locally.

Added support for GOAWAY with 2^31-1 lastStreamId.

Added support for a peer to send and receive multiple GOAWAY frames.

Reviewed the stream creation/destruction mechanism so that when the last stream completes after a GOAWAY, proper actions can be run to tear down the connection.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-10 10:07:19 +01:00
Simone Bordet 044052d717 Issue 5310 - Review HTTP/2 GOAWAY handling.
Code cleanups: removed unnecessary final modifiers and fixed code warnings.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-10 09:56:33 +01:00
Simone Bordet 206050df7f Issue 5310 - Review HTTP/2 GOAWAY handling.
Refactored push code in a single place: HTTP2Session.push().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-10 09:56:32 +01:00
Simone Bordet 0dc2894002 Issue 5310 - Review HTTP/2 GOAWAY handling.
Refactored reset code in a single place: HTTP2Session.reset().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-10 09:56:32 +01:00
Simone Bordet 62e17da2d0 Issue 5310 - Review HTTP/2 GOAWAY handling.
Moved stream "close" event after returning from listener methods.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-10 09:56:32 +01:00
Ludovic Orban 814dc69803 Get rid of addContent() by making produceContent() return Content instead.
Make EOF and errors be special content.
Transition to a much simplified FSM by using the needContent() / produceContent() model.
Implement blocking on top of async, this way there is only one FSM.
(Milestone 6)

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-11-03 17:30:25 +01:00
Ludovic Orban a4258ec9c0 Merge all HttpInput* impls into a single class, push all differences to HttpChannel* impls (Milestone 5)
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-11-03 17:30:25 +01:00
Ludovic Orban d0f04a8eae addContent now returns void (Milestone 4)
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-11-03 17:30:25 +01:00
Ludovic Orban 946f334810 http2 impl (Milestone 2)
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-11-03 17:30:25 +01:00
Joakim Erdfelt edaadff55b Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
Joakim Erdfelt e46af88704 Updating to version 9.4.34.v20201102 2020-11-02 08:03:51 -06:00
olivier lamy 651f23ee25 Merge branch 'jetty-9.4.x' into jetty-10.0.x 2020-10-28 12:12:07 +10:00
Olivier Lamy 47885f7ecb
Jetty 9.4.x h2spec-maven-plugin now check if docker is available (new version fixing issues with generated junit file) (#5497)
* skip h2spec if no docker available

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

* active snapshot-repositories for jenkins build

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

* h2spec plugin 1.0.1

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

* new snapshot to debug jenkins

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

* simplify build to ease debug

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

* force snapshot download:

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

* use h2spec release 1.0.2

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

* remove commented sections

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

* no need of this profile

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

* profile not needed anymore

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-10-28 12:07:49 +10:00
Joakim Erdfelt e726eefb0b Updating to version 9.4.34-SNAPSHOT 2020-10-20 18:55:39 -05:00
Joakim Erdfelt 1be6875565 Updating to version 9.4.33.v20201020 2020-10-20 18:28:51 -05:00
Simone Bordet a949afef64 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-10-19 18:24:38 +02:00
Simone Bordet 8de2fbce49 Code cleanup, merging streams[Opened|Closed] from subclasses into HTTP2Session.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-10-18 13:01:40 +02:00
Joakim Erdfelt 1e9c736692
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-10-16 17:51:32 -05:00
Joakim Erdfelt e6fb4c3ac4 More fixes to allow project to build on Windows 10 2020-10-16 16:45:25 -05:00
Joakim Erdfelt 07d35d32ae Fixing windows build/test issues. 2020-10-16 15:39:38 -05:00
Lachlan Roberts 5800f4605f Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-10-16 15:37:24 +11:00
Simone Bordet c73ad40511 Code cleanup.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-10-15 15:41:57 +02:00
Joakim Erdfelt 85e257fc98 Updating to version 9.4.33-SNAPSHOT 2020-09-30 11:53:09 -05:00
Joakim Erdfelt de97d26f7b Updating to version 9.4.32.v20200930 2020-09-30 11:03:24 -05:00
Joakim Erdfelt cc7ad29a91
Fixing bad merge: synchronized to AutoLock
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-30 09:46:21 -05:00
Simone Bordet c2df8c172b Improvements to the Jetty documentation.
Ported the HTTP/2 documentation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-09-30 10:37:46 +02:00
gregw b7a4c36286 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: gregw <gregw@webtide.com>
2020-09-16 18:31:51 +02:00
Ludovic Orban a37ab389aa
increase the connector's idle timeout to make sure the idle timeout does not fire spuriously. (#5281)
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-09-16 16:14:11 +02:00
Greg Wilkins 780e1207c7
Issue #5254 List/Show modules (#5257)
* Issue #5254 List/Show modules

 * simplified --list-modules output
 * added --show-module

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

* improve module descriptions

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-09-14 18:07:16 +02:00
Olivier Lamy ccab123f20 h2s spec maven plugin 1.0.0 with h2spec 2.6.0 (#5231)
* use our fork of h2spec-maven-plugin and upgrade version

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-09-14 21:07:53 +10:00
Olivier Lamy 3849a9118f
h2s spec maven plugin 1.0.0 with h2spec 2.6.0 (#5231)
* use our fork of h2spec-maven-plugin and upgrade version

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

* add a profile to run spec server

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

* use h2spec plugin new version

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

* version h2spec 1.0.0

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

* exclude specs we know not working

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

* use our own package name

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

* test no exclusion

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

* restore known failure

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

* h2spec maven plugin version 1.0.0

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

* change default port for manual testing

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-09-14 21:01:10 +10:00
Simone Bordet f40efbf6de Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-09-10 13:38:50 +02:00
Simone Bordet 892a715bea Small javadocs fixes.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-09-10 13:35:06 +02:00
Simone Bordet b997410845 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-09-10 13:26:15 +02:00
Simone Bordet f81bf7f945
Fixes #3766 - Introduce HTTP/2 API to batch frames. (#5222)
* Fixes #3766 - Introduce HTTP/2 API to batch frames.

Introduced Stream.FrameList to hold HEADERS+DATA+HEADERS frames.
These are often used by the client and by the server when the
request/response content is known and FrameList will allow to
send them in a single TCP write, rather than multiple ones.

Rewritten HttpSenderOverHTTP2.sendHeaders() and
HttpTransportOverHTTP2.sendHeaders() to take advantage of
FrameList.

Now using ConcurrentHashMap as a client context, because
with DEBUG logging enabled it may be access concurrently.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-09-10 10:13:14 +02:00
Simone Bordet 3f0b1573ec Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-09-02 17:45:45 +02:00
Simone Bordet 1e90d13127 Fixes #5103 - Proxy sets protocol version to 2.0 instead of 1.1 when accessed from H2 client.
Fixed by removing the explicit version copy.
Leaving it at default would make the client transport
decide the version based on the transport protocol it uses.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-09-02 16:39:02 +02:00
Simone Bordet 30303c7979 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-25 16:15:33 +02:00
Jan Bartel 77779ed6d8
Issue #4996 - Regularlize logging (#5167)
* Issue #4996 Regularize logging

Signed-off-by: Jan Bartel <janb@webtide.com>

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-24 17:15:13 +02: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
olivier lamy c198d26e6b Updating to version 10.0.0-SNAPSHOT 2020-08-11 16:47:55 +08:00
olivier lamy 429b091578 Updating to version 10.0.0.beta1 2020-08-11 16:47:54 +08:00
Simone Bordet c49035570e Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-convert_synchronized_to_autolock'. 2020-08-04 16:32:55 +02:00
Simone Bordet 2fe01626a5 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-31 17:47:37 +02:00
Ludovic Orban e9dad975e6 Re-implement HTTP connection pooling with a non-queuing algorithm
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-07-31 10:36:43 +02:00
Simone Bordet 089e51f0bc Fixes #5083 - Convert synchronized usages to AutoLock.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-29 15:34:01 +02:00
Simone Bordet 8d69fc41a7 Fixes #5083 - Convert synchronized usages to AutoLock.
* Replaced relevant usages of synchronized with AutoLock.
* Made AutoLock serializable since classes that use it may be stored in the HttpSession.
* Added convenience methods to AutoLock to execute lambdas with the lock held.
* Introduced AutoLock.WithCondition to use a Lock and a Condition together.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-27 23:14:05 +02:00
Simone Bordet a33b0e290e Avoid using a protected Logger instance.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-27 16:05:03 +02:00
Joakim Erdfelt fe9deae849 Updating to version 9.4.32-SNAPSHOT 2020-07-23 13:53:47 -05:00
Joakim Erdfelt 450ba27947 Updating to version 9.4.31.v20200723 2020-07-23 12:46:54 -05:00
Lachlan Roberts c09e4d6f86 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-16 08:46:29 +10:00
Lachlan Roberts de1b6745c5 the DO NOT EDIT comment in .mod files should start with '#'
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-15 16:47:22 +10:00
olivier lamy eefe3d202b revert fail release
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-07-10 15:04:22 +10:00
olivier lamy 9619a5a743 Updating to version 10.0.0.beta1 2020-07-10 14:23:28 +10:00
Simone Bordet 113595254b Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-09 16:19:24 +02:00
Simone Bordet 94956d6e8b Issue #4904 - WebsocketClient creates more connections than needed.
Fixed MaxConcurrentStreamsTest - it was always broken.
The problem was that the call to super.onSettings(...) was done
_after_ sending the request, so the connection pool was still
configured with the default maxMultiplex=1024.

Also fixed AbstractConnectionPool to avoid a second call to
activate() if we are not trying to create a new connection.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-09 16:18:15 +02:00
olivier lamy aaeffb719e Updating to version 10.0.0-SNAPSHOT 2020-07-09 12:25:34 +10:00
olivier lamy 23c99ffdbe Updating to version 10.0.0.beta1 2020-07-09 11:20:55 +10:00
Simone Bordet fb07bdf159 Issue #4967 - Possible buffer corruption in HTTP/2 session failures.
Fixed test failure after merge.

Made sure the lastStreamId is updated when resetting a new
stream since it has been seen by the server and handled.

This avoids that a new stream arriving during shutdown is
interpreted as a connection failure, therefore failing all
pending streams - we want them to complete.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-07 11:42:16 +02:00
Simone Bordet ba6a6ea67d Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-06 23:10:19 +02:00
Simone Bordet f2c6b67827
Fixes #4971 - Simplify Connection.upgradeFrom()/upgradeTo(). (#5008)
Fixes #4971 - Simplify Connection.upgradeFrom()/upgradeTo().

Now the upgrade-from connection produces a "floating" buffer 
(not belonging to a pool), so that it can release the original buffer.

The upgrade-to connection is free to copy or store this "floating" buffer.

Strengthened ByteBufferPool behavior when releasing non-pooled
ByteBuffers: the buffer is now discarded.

Updated javadocs and all implementations.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-06 22:45:03 +02:00
Simone Bordet 3eb031b2b9 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-06 17:30:14 +02:00
Simone Bordet 43353d0ca9 Issue #4890 - JettyClient behavior when SETTINGS_HEADER_TABLE_SIZE is set to 0 in SETTINGS Frame.
Fixed NPE in debug logs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-06 17:29:07 +02:00
Simone Bordet 7d8e56bd10 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-03 16:46:23 +02:00
Simone Bordet ae43b70a9f
Jetty 9.4.x 4967 buffer corruption for http2 failures (#5001)
Fixes #4967 - Possible buffer corruption in HTTP/2 session failures

Partially reverted the changes introduced in #4855, because they
were working only when sends were synchronous.

Introduced ByteBufferPool.remove(ByteBuffer) to fix the issue.
Now when a concurrent failure happens while frames are being
generated or sent, the buffer is discarded instead of being
recycled, therefore resolving the buffer corruption.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-03 16:35:33 +02:00
Simone Bordet 0b854a1f5f Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-06-18 15:37:09 +02:00
Simone Bordet c0481a5e5f
Issue #4965 - WINDOW_UPDATE for locally failed stream should not clos… (#4969)
* Issue #4965 - WINDOW_UPDATE for locally failed stream should not close the HTTP/2 session.

Improved HTTP2Session.onWindowUpdate() code to correctly check whether
the stream is already closed, and if so, just drop the WINDOW_UPDATE.
Refactored onResetForUnknownStream() to base class.
Other small refactorings to improve logging.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-06-18 15:23:51 +02:00
Joakim Erdfelt 6df6fa33b8 Updating to version 9.4.31-SNAPSHOT 2020-06-11 08:24:34 -05:00
Joakim Erdfelt 271836e4c1 Updating to version 9.4.30.v20200611 2020-06-11 07:21:18 -05:00
Simone Bordet 207336338e Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-06-09 17:08:31 +02:00
Ludovic Orban 714a9204b3 #4855 fix race condition that can sometimes make H2 stream send an improper reset with cancel error code instead of protocol error code when the client sends more data than the content-length header specifies
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-06-09 16:59:49 +02:00
Simone Bordet dd6cd4b881 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-06-09 16:11:53 +02:00
Simone Bordet 56bda1b3ae
Jetty 9.4.x 4855 h2spec failures (#4946)
* Fixes #4855 - Occasional h2spec failures on CI

In case of bad usage of the HTTP/2 API, we don't want to close()
the stream but just fail the callback, because the stream
may be performing actions triggered by a legit API usage.

In case of a call to `AsyncListener.onError()`, applications may decide to call
AsyncContext.complete() and that would be a correct usage of the Servlet API.
This case was not well handled and was wrongly producing a WARN log with an
`IllegalStateException`.

Completely rewritten `HttpTransportOverHTTP2.TransportCallback`.
The rewrite handles correctly asynchronous failures that now are executed
sequentially (and not concurrently) with writes.
If a write is in progress, the failure will just change the state and at the
end of the write a check on the state will determine what actions to take.

A session failure is now handled in HTTP2Session by first failing all the
streams - which notifies the Stream.Listeners - and then failing the session
- which notifies the Session.Listener.
The stream failures are executed concurrently by dispatching each one to a
different thread; this means that the stream failure callbacks are executed
concurrently (likely sending RST_STREAM frames).
The session failure callback is completed only when all the stream failure
callbacks have completed, to ensure that a GOAWAY frame is processed after
all the RST_STREAM frames.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-06-09 13:15:05 +02:00
Ludovic Orban eb6db0db66
#4855 disable racy h2spec test (#4950)
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-06-09 09:48:15 +02:00
Simone Bordet b904a5cc85 Do not assume the ByteBuffer has a backing byte array.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-06-04 11:49:42 +02:00
Simone Bordet cf998fb321 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-06-01 16:34:33 +02:00