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

Unified Diff: net/spdy/spdy_session.cc

Issue 492063002: Allow SPDY POSTs to be terminated by an empty FIN data frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment in response to comment Created 6 years, 4 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
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 51c6ee7919db120bb9c610c0028ff3daf12a1255..bbf35bf1d53db0027d2cf58ce3936a9ea3bf125b 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -1182,7 +1182,10 @@ scoped_ptr<SpdyBuffer> SpdySession::CreateDataBuffer(SpdyStreamId stream_id,
scoped_ptr<SpdyBuffer> data_buffer(new SpdyBuffer(frame.Pass()));
- if (flow_control_state_ == FLOW_CONTROL_STREAM_AND_SESSION) {
+ // Send window size is based on payload size, so nothing to do if this is
+ // just a FIN with no payload.
+ if (flow_control_state_ == FLOW_CONTROL_STREAM_AND_SESSION &&
+ effective_len != 0) {
DecreaseSendWindowSize(static_cast<int32>(effective_len));
data_buffer->AddConsumeCallback(
base::Bind(&SpdySession::OnWriteBufferConsumed,

Powered by Google App Engine
This is Rietveld 408576698