Bug 1322373 - TLS 1.3 early-data for http/2

This commit is contained in:
janekptacijarabaci 2018-02-11 07:48:28 +01:00 committed by Roy Tam
commit 202ca6d067
11 changed files with 342 additions and 82 deletions

View file

@ -43,12 +43,13 @@ public:
NS_DECL_NSAHTTPSEGMENTREADER
NS_DECL_NSAHTTPSEGMENTWRITER
Http2Session(nsISocketTransport *, uint32_t version);
Http2Session(nsISocketTransport *, uint32_t version, bool attemptingEarlyData);
bool AddStream(nsAHttpTransaction *, int32_t,
bool, nsIInterfaceRequestor *) override;
bool CanReuse() override { return !mShouldGoAway && !mClosed; }
bool RoomForMoreStreams() override;
uint32_t SpdyVersion() override;
// When the connection is active this is called up to once every 1 second
// return the interval (in seconds) that the connection next wants to
@ -235,6 +236,8 @@ public:
// overload of nsAHttpTransaction
nsresult ReadSegmentsAgain(nsAHttpSegmentReader *, uint32_t, uint32_t *, bool *) override final;
nsresult WriteSegmentsAgain(nsAHttpSegmentWriter *, uint32_t , uint32_t *, bool *) override final;
bool Do0RTT() override final { return true; }
nsresult Finish0RTT(bool aRestart, bool aAlpnChanged) override final;
private:
@ -492,6 +495,10 @@ private:
bool mUseH2Deps;
bool mAttemptingEarlyData;
// The ID(s) of the stream(s) that we are getting 0RTT data from.
nsTArray<uint32_t> m0RTTStreams;
private:
/// connect tunnels
void DispatchOnTunnel(nsAHttpTransaction *, nsIInterfaceRequestor *);