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

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

Issue 371213002: Fixes for re-enabling more MSVC level 4 warnings: net/quic/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments Created 6 years, 5 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 | « net/quic/quic_server_id_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/quic/quic_spdy_server_stream.h" 5 #include "net/quic/quic_spdy_server_stream.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "net/quic/quic_in_memory_cache.h" 9 #include "net/quic/quic_in_memory_cache.h"
10 #include "net/quic/quic_session.h" 10 #include "net/quic/quic_session.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 return; 69 return;
70 } 70 }
71 71
72 SendResponse(); 72 SendResponse();
73 } 73 }
74 74
75 // Try parsing the request headers. If successful, sets 75 // Try parsing the request headers. If successful, sets
76 // request_headers_received_. If not successful, it can just be tried again once 76 // request_headers_received_. If not successful, it can just be tried again once
77 // there's more data. 77 // there's more data.
78 void QuicSpdyServerStream::ParseRequestHeaders() { 78 void QuicSpdyServerStream::ParseRequestHeaders() {
79 SpdyFramer framer((kDefaultSpdyMajorVersion)); 79 SpdyFramer framer(kDefaultSpdyMajorVersion);
80 char* data = read_buf_->StartOfBuffer(); 80 char* data = read_buf_->StartOfBuffer();
81 size_t read_buf_len = static_cast<size_t>(read_buf_->offset()); 81 size_t read_buf_len = static_cast<size_t>(read_buf_->offset());
82 size_t len = framer.ParseHeaderBlockInBuffer(data, read_buf_len, &headers_); 82 size_t len = framer.ParseHeaderBlockInBuffer(data, read_buf_len, &headers_);
83 if (len == 0) { 83 if (len == 0) {
84 // Not enough data yet, presumably. (If we still don't succeed by the end of 84 // Not enough data yet, presumably. (If we still don't succeed by the end of
85 // the stream, then we'll error above.) 85 // the stream, then we'll error above.)
86 return; 86 return;
87 } 87 }
88 88
89 // Headers received and parsed: extract the request URL. 89 // Headers received and parsed: extract the request URL.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 &header_block); 150 &header_block);
151 151
152 WriteHeaders(header_block, body.empty(), NULL); 152 WriteHeaders(header_block, body.empty(), NULL);
153 153
154 if (!body.empty()) { 154 if (!body.empty()) {
155 WriteOrBufferData(body, true, NULL); 155 WriteOrBufferData(body, true, NULL);
156 } 156 }
157 } 157 }
158 158
159 } // namespace net 159 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_server_id_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698