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

Unified Diff: net/spdy/http2_frame_decoder_adapter.cc

Issue 2723203002: Do not enforce origin length and stream id requirement for ALTSVC frames. (Closed)
Patch Set: Created 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/http2_frame_decoder_adapter.cc
diff --git a/net/spdy/http2_frame_decoder_adapter.cc b/net/spdy/http2_frame_decoder_adapter.cc
index d1d5020a4d3c0961f1656d92a420959d64dd8164..94741a25ff6f94746d3d0d094381c50f799381e8 100644
--- a/net/spdy/http2_frame_decoder_adapter.cc
+++ b/net/spdy/http2_frame_decoder_adapter.cc
@@ -470,6 +470,10 @@ class Http2DecoderAdapter : public SpdyFramerDecoderAdapter,
}
}
+ // Per RFC7838, an ALTSVC frame on stream 0 with origin_length == 0, or one on
+ // a stream other than stream 0 with origin_length != 0 MUST be ignored. All
+ // frames are decoded by Http2DecoderAdapter, and it is left to the consumer
+ // (listener) to implement this behavior.
void OnAltSvcStart(const Http2FrameHeader& header,
size_t origin_length,
size_t value_length) override {
@@ -479,11 +483,6 @@ class Http2DecoderAdapter : public SpdyFramerDecoderAdapter,
if (!IsOkToStartFrame(header)) {
return;
}
- // Per RFC7838, origin_length must be zero IFF the stream id is non-zero.
- if ((origin_length == 0 && !HasRequiredStreamId(header)) ||
- (origin_length != 0 && !HasRequiredStreamIdZero(header))) {
- return;
- }
frame_header_ = header;
has_frame_header_ = true;
alt_svc_origin_.clear();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698