diff options
author | bnc <bnc@chromium.org> | 2015-03-25 04:33:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-25 11:34:11 +0000 |
commit | 43cdf67d11deda1a4ccca51e44a5183bda93b245 (patch) | |
tree | 3f5aed9f66751a16784208befb6e6ee334237c41 /net/tools/flip_server | |
parent | 851489733b9a58323a034cb9cc3a7aee57938297 (diff) | |
download | chromium_src-43cdf67d11deda1a4ccca51e44a5183bda93b245.zip chromium_src-43cdf67d11deda1a4ccca51e44a5183bda93b245.tar.gz chromium_src-43cdf67d11deda1a4ccca51e44a5183bda93b245.tar.bz2 |
Account for HTTP/2 padding in receive windows.
Account for pad length field and padding in HTTP/2 session and stream receive
windows, because they are part of the payload.
This CL introduces a new method OnStreamPadding, calls it when processing
padding, implements it to update the receive windows appropriately (both
for session and for stream), and adds trivial implementations for all
subclasses.
This CL also lands internal changes 88830613 and 89327497 by bnc
and 89034703 by mpw.
BUG=353012
Review URL: https://codereview.chromium.org/959743002
Cr-Commit-Position: refs/heads/master@{#322137}
Diffstat (limited to 'net/tools/flip_server')
-rw-r--r-- | net/tools/flip_server/spdy_interface.cc | 5 | ||||
-rw-r--r-- | net/tools/flip_server/spdy_interface.h | 5 | ||||
-rw-r--r-- | net/tools/flip_server/spdy_interface_test.cc | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/net/tools/flip_server/spdy_interface.cc b/net/tools/flip_server/spdy_interface.cc index 22da7db..facbe5b 100644 --- a/net/tools/flip_server/spdy_interface.cc +++ b/net/tools/flip_server/spdy_interface.cc @@ -240,6 +240,11 @@ void SpdySM::OnStreamFrameData(SpdyStreamId stream_id, interface->ProcessWriteInput(data, len); } +void SpdySM::OnStreamPadding(SpdyStreamId stream_id, size_t len) { + VLOG(2) << ACCEPTOR_CLIENT_IDENT << "SpdySM: StreamPadding(" << stream_id + << ", [" << len << "])"; +} + void SpdySM::OnSynStream(SpdyStreamId stream_id, SpdyStreamId associated_stream_id, SpdyPriority priority, diff --git a/net/tools/flip_server/spdy_interface.h b/net/tools/flip_server/spdy_interface.h index 15cf0e9..20bc0c9 100644 --- a/net/tools/flip_server/spdy_interface.h +++ b/net/tools/flip_server/spdy_interface.h @@ -102,6 +102,11 @@ class SpdySM : public BufferedSpdyFramerVisitorInterface, public SMInterface { size_t len, bool fin) override; + // Called when padding is received (padding length field or padding octets). + // |stream_id| The stream receiving data. + // |len| The number of padding octets. + void OnStreamPadding(SpdyStreamId stream_id, size_t len) override; + // Called when a SETTINGS frame is received. // |clear_persisted| True if the respective flag is set on the SETTINGS frame. void OnSettings(bool clear_persisted) override {} diff --git a/net/tools/flip_server/spdy_interface_test.cc b/net/tools/flip_server/spdy_interface_test.cc index d845438..6aa3d30 100644 --- a/net/tools/flip_server/spdy_interface_test.cc +++ b/net/tools/flip_server/spdy_interface_test.cc @@ -63,6 +63,7 @@ class SpdyFramerVisitor : public BufferedSpdyFramerVisitorInterface { const char*, size_t, bool)); + MOCK_METHOD2(OnStreamPadding, void(SpdyStreamId, size_t)); MOCK_METHOD1(OnSettings, void(bool clear_persisted)); MOCK_METHOD3(OnSetting, void(SpdySettingsIds, uint8, uint32)); MOCK_METHOD2(OnPing, void(SpdyPingId unique_id, bool is_ack)); |