From chatting with mmenke@, particularly due to the ALPN-swapping hilarity, probably the way to go here is to have HttpStream spit out a special ERR_EARLY_DATA_REJECTED error code which signals HttpNetworkTransaction to try again. At the socket layer, once a socket has hit that error and reset itself, it is returned into the socket pool, ready for 1-RTT requests. Then HttpNetworkTransaction's retry will pick it up (or fail to).
The annoying TLS 1.2 0-RTT incompatibility fallback can be implemented by simply mapping the 1.2 ServerHello on 0-RTT offer error to ERR_EARLY_DATA_REJECTED without returning anything to the socket pool.
(Trying to keep continuity between early write and the retry will take a lot of plumbing and isn't worth it since it isn't even possible. Consider the hilarious case where we 0-RTT-predict an HTTP/2 session, attack 20 requests to it, and then server rejects 0-RTT and says "Nope! Let's speak HTTP/1.1 instead.")
Comment 1 by svaldez@chromium.org
, Feb 6 2018Status: Assigned (was: Untriaged)