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

Unified Diff: net/quic/quic_framer.cc

Issue 1908103002: Landing Recent QUIC changes until 4/15/2016 17:20 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 8 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/quic/quic_flow_controller_test.cc ('k') | net/quic/quic_header_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_framer.cc
diff --git a/net/quic/quic_framer.cc b/net/quic/quic_framer.cc
index da91cfca96cd49b0a7378613fe52d07d7d922a39..1dd0064570b6edccdbd930e8ddf5a997dee0a311 100644
--- a/net/quic/quic_framer.cc
+++ b/net/quic/quic_framer.cc
@@ -4,7 +4,8 @@
#include "net/quic/quic_framer.h"
-#include <stdint.h>
+#include <cstdint>
+#include <memory>
#include "base/compiler_specific.h"
#include "base/logging.h"
@@ -1494,8 +1495,13 @@ bool QuicFramer::ProcessRstStreamFrame(QuicDataReader* reader,
}
if (error_code >= QUIC_STREAM_LAST_ERROR) {
- set_detailed_error("Invalid rst stream error code.");
- return false;
+ if (FLAGS_quic_ignore_invalid_error_code) {
+ // Ignore invalid stream error code if any.
+ error_code = QUIC_STREAM_LAST_ERROR;
+ } else {
+ set_detailed_error("Invalid rst stream error code.");
+ return false;
+ }
}
frame->error_code = static_cast<QuicRstStreamErrorCode>(error_code);
@@ -1511,8 +1517,13 @@ bool QuicFramer::ProcessConnectionCloseFrame(QuicDataReader* reader,
}
if (error_code >= QUIC_LAST_ERROR) {
- set_detailed_error("Invalid error code.");
- return false;
+ if (FLAGS_quic_ignore_invalid_error_code) {
+ // Ignore invalid QUIC error code if any.
+ error_code = QUIC_LAST_ERROR;
+ } else {
+ set_detailed_error("Invalid error code.");
+ return false;
+ }
}
frame->error_code = static_cast<QuicErrorCode>(error_code);
@@ -1534,12 +1545,17 @@ bool QuicFramer::ProcessGoAwayFrame(QuicDataReader* reader,
set_detailed_error("Unable to read go away error code.");
return false;
}
- frame->error_code = static_cast<QuicErrorCode>(error_code);
if (error_code >= QUIC_LAST_ERROR) {
- set_detailed_error("Invalid error code.");
- return false;
+ if (FLAGS_quic_ignore_invalid_error_code) {
+ // Ignore invalid QUIC error code if any.
+ error_code = QUIC_LAST_ERROR;
+ } else {
+ set_detailed_error("Invalid error code.");
+ return false;
+ }
}
+ frame->error_code = static_cast<QuicErrorCode>(error_code);
uint32_t stream_id;
if (!reader->ReadUInt32(&stream_id)) {
« no previous file with comments | « net/quic/quic_flow_controller_test.cc ('k') | net/quic/quic_header_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698