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

Side by Side Diff: net/spdy/buffered_spdy_framer.cc

Issue 316983006: SPDY4 shouldn't emit RST_STREAM payloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/buffered_spdy_framer.h" 5 #include "net/spdy/buffered_spdy_framer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // TODO(hkhalil): Avoid copy here. 291 // TODO(hkhalil): Avoid copy here.
292 syn_reply.set_name_value_block(*headers); 292 syn_reply.set_name_value_block(*headers);
293 return spdy_framer_.SerializeSynReply(syn_reply); 293 return spdy_framer_.SerializeSynReply(syn_reply);
294 } 294 }
295 295
296 // TODO(jgraettinger): Eliminate uses of this method (prefer 296 // TODO(jgraettinger): Eliminate uses of this method (prefer
297 // SpdyRstStreamIR). 297 // SpdyRstStreamIR).
298 SpdyFrame* BufferedSpdyFramer::CreateRstStream( 298 SpdyFrame* BufferedSpdyFramer::CreateRstStream(
299 SpdyStreamId stream_id, 299 SpdyStreamId stream_id,
300 SpdyRstStreamStatus status) const { 300 SpdyRstStreamStatus status) const {
301 SpdyRstStreamIR rst_ir(stream_id, status, "RST"); 301 // RST_STREAM payloads are not part of any SPDY spec.
302 // SpdyFramer will accept them, but don't create them.
303 SpdyRstStreamIR rst_ir(stream_id, status, "");
302 return spdy_framer_.SerializeRstStream(rst_ir); 304 return spdy_framer_.SerializeRstStream(rst_ir);
303 } 305 }
304 306
305 // TODO(jgraettinger): Eliminate uses of this method (prefer 307 // TODO(jgraettinger): Eliminate uses of this method (prefer
306 // SpdySettingsIR). 308 // SpdySettingsIR).
307 SpdyFrame* BufferedSpdyFramer::CreateSettings( 309 SpdyFrame* BufferedSpdyFramer::CreateSettings(
308 const SettingsMap& values) const { 310 const SettingsMap& values) const {
309 SpdySettingsIR settings_ir; 311 SpdySettingsIR settings_ir;
310 for (SettingsMap::const_iterator it = values.begin(); 312 for (SettingsMap::const_iterator it = values.begin();
311 it != values.end(); 313 it != values.end();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 384
383 void BufferedSpdyFramer::InitHeaderStreaming(SpdyStreamId stream_id) { 385 void BufferedSpdyFramer::InitHeaderStreaming(SpdyStreamId stream_id) {
384 memset(header_buffer_, 0, kHeaderBufferSize); 386 memset(header_buffer_, 0, kHeaderBufferSize);
385 header_buffer_used_ = 0; 387 header_buffer_used_ = 0;
386 header_buffer_valid_ = true; 388 header_buffer_valid_ = true;
387 header_stream_id_ = stream_id; 389 header_stream_id_ = stream_id;
388 DCHECK_NE(header_stream_id_, SpdyFramer::kInvalidStream); 390 DCHECK_NE(header_stream_id_, SpdyFramer::kInvalidStream);
389 } 391 }
390 392
391 } // namespace net 393 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698