Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Unified Diff: net/spdy/spdy_framer.cc

Issue 959743002: Account for HTTP/2 padding in receive windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/spdy/spdy_framer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_framer.cc
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index e7603ff7bd445d6ee723db28f17a0ee7badba672..a706c56ab0540a3dc7ef7e35faa63854983e4b96 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -2155,6 +2155,8 @@ size_t SpdyFramer::ProcessDataFramePaddingLength(const char* data, size_t len) {
size_t original_len = len;
if (current_frame_flags_ & DATA_FLAG_PADDED) {
if (len != 0) {
+ static_assert(kPadLengthFieldSize == 1,
+ "Unexpected pad length field size.");
if (remaining_data_length_ < kPadLengthFieldSize) {
set_error(SPDY_INVALID_DATA_FRAME_FLAGS);
return 0;
@@ -2164,6 +2166,11 @@ size_t SpdyFramer::ProcessDataFramePaddingLength(const char* data, size_t len) {
++data;
--len;
--remaining_data_length_;
+
+ // Notify visitor that |kPadLengthFieldSize| bytes of payload are
+ // consumed.
+ visitor_->OnStreamFrameData(current_frame_stream_id_, NULL,
+ kPadLengthFieldSize, false);
Ryan Hamilton 2015/02/25 21:59:15 Should this change land internally first? In any c
} else {
// We don't have the data available for parsing the pad length field. Keep
// waiting.
« no previous file with comments | « no previous file | net/spdy/spdy_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698