| Index: net/spdy/spdy_framer.cc
|
| diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
|
| index 23080accd994ad2c6982d3e639fdaab2a1c28981..5242e806b36b2d77aaba722e8dfb61c37a362cd1 100644
|
| --- a/net/spdy/spdy_framer.cc
|
| +++ b/net/spdy/spdy_framer.cc
|
| @@ -438,6 +438,10 @@ const char* SpdyFramer::StatusCodeToString(int status_code) {
|
| return "INVALID_CREDENTIALS";
|
| case RST_STREAM_FRAME_TOO_LARGE:
|
| return "FRAME_TOO_LARGE";
|
| + case RST_STREAM_CONNECT_ERROR:
|
| + return "CONNECT_ERROR";
|
| + case RST_STREAM_ENHANCE_YOUR_CALM:
|
| + return "ENHANCE_YOUR_CALM";
|
| }
|
| return "UNKNOWN_STATUS";
|
| }
|
| @@ -1816,10 +1820,8 @@ size_t SpdyFramer::ProcessRstStreamFramePayload(const char* data, size_t len) {
|
| uint32 status_raw = status;
|
| bool successful_read = reader.ReadUInt32(&status_raw);
|
| DCHECK(successful_read);
|
| - // We've read an unsigned integer, so it's enough to only check
|
| - // upper bound to ensure the value is in valid range.
|
| - if (status_raw > RST_STREAM_INVALID &&
|
| - status_raw < RST_STREAM_NUM_STATUS_CODES) {
|
| + if (SpdyConstants::IsValidRstStreamStatus(protocol_version(),
|
| + status_raw)) {
|
| status = static_cast<SpdyRstStreamStatus>(status_raw);
|
| } else {
|
| // TODO(hkhalil): Probably best to OnError here, depending on
|
|
|