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

Unified Diff: net/spdy/spdy_framer.cc

Issue 1402373005: Remove description from HTTP/2 RST_STREAM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « net/spdy/buffered_spdy_framer.cc ('k') | 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 beb20bc3e9c76764af16c986a0a98ee5693c958b..c034311b5cec1b6fc7db6c092de9b54078f98300 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -953,9 +953,8 @@ void SpdyFramer::ProcessControlFrameHeader(int control_frame_type_field) {
}
break;
case RST_STREAM:
- // For SPDY versions < 4, the header has a fixed length.
- // For SPDY version 4 and up, the RST_STREAM frame may include optional
- // opaque data, so we only have a lower limit on the frame size.
+ // TODO(bnc): Enforce the length of the header, and change error to
+ // FRAME_SIZE_ERROR.
if ((current_frame_length_ != GetRstStreamMinimumSize() &&
protocol_version() <= SPDY3) ||
(current_frame_length_ < GetRstStreamMinimumSize() &&
@@ -2442,9 +2441,6 @@ SpdySerializedFrame* SpdyFramer::SerializeRstStream(
// commented but left in place to simplify future patching.
// Compute the output buffer size, taking opaque data into account.
size_t expected_length = GetRstStreamMinimumSize();
- if (protocol_version() > SPDY3) {
- expected_length += rst_stream.description().size();
- }
SpdyFrameBuilder builder(expected_length, protocol_version());
// Serialize the RST_STREAM frame.
@@ -2458,12 +2454,6 @@ SpdySerializedFrame* SpdyFramer::SerializeRstStream(
builder.WriteUInt32(SpdyConstants::SerializeRstStreamStatus(
protocol_version(), rst_stream.status()));
- // In HTTP2 and up, RST_STREAM frames may also specify opaque data.
- if (protocol_version() > SPDY3 && rst_stream.description().size() > 0) {
- builder.WriteBytes(rst_stream.description().data(),
- rst_stream.description().size());
- }
-
DCHECK_EQ(expected_length, builder.length());
return builder.take();
}
« no previous file with comments | « net/spdy/buffered_spdy_framer.cc ('k') | net/spdy/spdy_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698