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

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

Issue 185203003: Killing off QUICv12, including cleaning out all of the code for handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Deleted unused StripUint32 Created 6 years, 9 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 "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "net/quic/quic_session.h" 8 #include "net/quic/quic_session.h"
9 #include "net/spdy/spdy_framer.h" 9 #include "net/spdy/spdy_framer.h"
10 #include "net/tools/quic/quic_in_memory_cache.h" 10 #include "net/tools/quic/quic_in_memory_cache.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 const BalsaHeaders& response_headers, 125 const BalsaHeaders& response_headers,
126 StringPiece body) { 126 StringPiece body) {
127 // We only support SPDY and HTTP, and neither handles bidirectional streaming. 127 // We only support SPDY and HTTP, and neither handles bidirectional streaming.
128 if (!read_side_closed()) { 128 if (!read_side_closed()) {
129 CloseReadSide(); 129 CloseReadSide();
130 } 130 }
131 131
132 SpdyHeaderBlock header_block = 132 SpdyHeaderBlock header_block =
133 SpdyUtils::ResponseHeadersToSpdyHeaders(response_headers); 133 SpdyUtils::ResponseHeadersToSpdyHeaders(response_headers);
134 134
135 if (version() > QUIC_VERSION_12) { 135 WriteHeaders(header_block, body.empty());
136 WriteHeaders(header_block, body.empty());
137 } else {
138 string headers_string =
139 session()->compressor()->CompressHeaders(header_block);
140 WriteOrBufferData(headers_string, body.empty());
141 }
142 136
143 if (!body.empty()) { 137 if (!body.empty()) {
144 WriteOrBufferData(body, true); 138 WriteOrBufferData(body, true);
145 } 139 }
146 } 140 }
147 141
148 } // namespace tools 142 } // namespace tools
149 } // namespace net 143 } // 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