Introduced ClientConnectionFactory.customize() to look for
Connection.Listener beans.
ClientConnectionFactory implementation calls customize() when they
create a Connection instance, so the Connection.Listener beans are
registered onto the Connection.
The issue was related to the fact that the proxy responded 407 with a
Connection: close header.
Because the endPoint underlying the original connection was closed,
it should not have been used as a tunnel.
Rather, the endPoint of the new CONNECT attempt (with the proxy
credentials) must be used for the tunnel.
Also partially backported the fix for #408.
Made sure that the idle timeout mechanism notifies the destination
that the connection will close.
Also reviewed the close protocol to be: notify destination, then abort,
then close. In this way, HTTP/2 can send RST_STREAM before the
connection is closed.
Fixed by improving the guard with a timestamp, and checking that the
time elapsed from the last timestamp is enough to prove it is a real
idle timeout.
Added guard to avoid that the idle timeout expires just before
sending the request.
Reworked the way idle timeouts are handled, to support the case where
the idle timeout just expired and the request can be tried on a
different connection/channel.
Fixed by returning false from ResponseContentParser.ResponseParser
.messageComplete(), so that the FastCGI parsing can continue and
parse the END_REQUEST frame.
Made associate(), disassociate() and abort() atomic operations using
the HttpExchange state to coordinate atomicity.
In this way, it's not possible to associate a HttpChannel and a
HttpExchange if the latter has been aborted.
The client connection's promise was succeeded in the context of a
call to SelectorManager.newConnection().
This was wrong, since succeeding the promise may trigger the send
of a request *before* the connection is actually linked to the
endPoint and opened.
This change moves the succeeding of the client connection's promise
to the connection onOpen() method.
Fixed by making the logic in HttpSender fail and complete the response
in case of request failure, without taking in consideration whether
the request was committed or aborted.
fillInterested() is called.
This is needed to avoid race conditions where fillInterested()
triggers a new thread entering onFillable() and acquiring a new buffer
while the previous thread is releasing the previous buffer.