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

Side by Side Diff: net/tools/quic/quic_spdy_server_stream.cc

Issue 14816006: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_PRIVATE_EXPORT to QuicWallTime Created 7 years, 7 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
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/tools/quic/quic_spdy_server_stream.h" 5 #include "net/tools/quic/quic_spdy_server_stream.h"
6 6
7 #include "net/quic/quic_session.h" 7 #include "net/quic/quic_session.h"
8 #include "net/spdy/spdy_framer.h" 8 #include "net/spdy/spdy_framer.h"
9 #include "net/tools/quic/spdy_utils.h" 9 #include "net/tools/quic/spdy_utils.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 return length; 44 return length;
45 } 45 }
46 46
47 void QuicSpdyServerStream::TerminateFromPeer(bool half_close) { 47 void QuicSpdyServerStream::TerminateFromPeer(bool half_close) {
48 ReliableQuicStream::TerminateFromPeer(half_close); 48 ReliableQuicStream::TerminateFromPeer(half_close);
49 // This is a full close: do not send a response. 49 // This is a full close: do not send a response.
50 if (!half_close) { 50 if (!half_close) {
51 return; 51 return;
52 } 52 }
53 if (write_side_closed() || fin_buffered()) {
54 return;
55 }
56
53 if (!request_headers_received_) { 57 if (!request_headers_received_) {
54 SendErrorResponse(); // We're not done writing headers. 58 SendErrorResponse(); // We're not done writing headers.
55 } else if ((headers().content_length_status() == 59 } else if ((headers().content_length_status() ==
56 BalsaHeadersEnums::VALID_CONTENT_LENGTH) && 60 BalsaHeadersEnums::VALID_CONTENT_LENGTH) &&
57 mutable_body()->size() != headers().content_length()) { 61 mutable_body()->size() != headers().content_length()) {
58 SendErrorResponse(); // Invalid content length 62 SendErrorResponse(); // Invalid content length
59 } else { 63 } else {
60 SendResponse(); 64 SendResponse();
61 } 65 }
62 } 66 }
(...skipping 28 matching lines...) Expand all
91 if (delta > 0) { 95 if (delta > 0) {
92 mutable_body()->append(data + len, delta); 96 mutable_body()->append(data + len, delta);
93 } 97 }
94 98
95 request_headers_received_ = true; 99 request_headers_received_ = true;
96 return len; 100 return len;
97 } 101 }
98 102
99 } // namespace tools 103 } // namespace tools
100 } // namespace net 104 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream.cc ('k') | net/tools/quic/quic_spdy_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698