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>
* 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>
* 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>
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>
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>
* 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>