| Index: net/spdy/spdy_framer.cc
|
| diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
|
| index 5afa3f22a13899cb73d822f6b78e304933355cfd..fe6958dc8d90d3ec92d7c2d2925c7dbd0ba05dc0 100644
|
| --- a/net/spdy/spdy_framer.cc
|
| +++ b/net/spdy/spdy_framer.cc
|
| @@ -1755,10 +1755,14 @@ size_t SpdyFramer::ProcessGoAwayFramePayload(const char* data, size_t len) {
|
| status = SpdyConstants::ParseGoAwayStatus(protocol_version(),
|
| status_raw);
|
| } else {
|
| - // TODO(hkhalil): Probably best to OnError here, depending on
|
| - // our interpretation of the spec. Keeping with existing liberal
|
| - // behavior for now.
|
| DCHECK(false);
|
| + // Throw an error for SPDY4+, keep liberal behavior
|
| + // for earlier versions.
|
| + if (protocol_version() > SPDY3) {
|
| + DLOG(WARNING) << "Invalid GO_AWAY status " << status_raw;
|
| + set_error(SPDY_INVALID_CONTROL_FRAME);
|
| + return 0;
|
| + }
|
| }
|
| }
|
| // Finished parsing the GOAWAY header, call frame handler.
|
| @@ -1820,9 +1824,13 @@ size_t SpdyFramer::ProcessRstStreamFramePayload(const char* data, size_t len) {
|
| status_raw)) {
|
| status = static_cast<SpdyRstStreamStatus>(status_raw);
|
| } else {
|
| - // TODO(hkhalil): Probably best to OnError here, depending on
|
| - // our interpretation of the spec. Keeping with existing liberal
|
| - // behavior for now.
|
| + // Throw an error for SPDY4+, keep liberal behavior
|
| + // for earlier versions.
|
| + if (protocol_version() > SPDY3) {
|
| + DLOG(WARNING) << "Invalid RST_STREAM status " << status_raw;
|
| + set_error(SPDY_INVALID_CONTROL_FRAME);
|
| + return 0;
|
| + }
|
| }
|
| // Finished parsing the RST_STREAM header, call frame handler.
|
| visitor_->OnRstStream(current_frame_stream_id_, status);
|
|
|