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