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

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

Issue 9958023: Properly handle spdy3 responses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 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/http/http_proxy_client_socket_pool_spdy3_unittest.cc ('k') | net/spdy/spdy_http_utils.h » ('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/spdy_http_stream.h" 5 #include "net/spdy/spdy_http_stream.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 // If the response is already received, these headers are too late. 341 // If the response is already received, these headers are too late.
342 if (response_headers_received_) { 342 if (response_headers_received_) {
343 LOG(WARNING) << "SpdyHttpStream headers received after response started."; 343 LOG(WARNING) << "SpdyHttpStream headers received after response started.";
344 return OK; 344 return OK;
345 } 345 }
346 346
347 // TODO(mbelshe): This is the time of all headers received, not just time 347 // TODO(mbelshe): This is the time of all headers received, not just time
348 // to first byte. 348 // to first byte.
349 response_info_->response_time = base::Time::Now(); 349 response_info_->response_time = base::Time::Now();
350 350
351 if (!SpdyHeadersToHttpResponse(response, response_info_)) { 351 if (!SpdyHeadersToHttpResponse(response, stream_->GetProtocolVersion(),
352 response_info_)) {
352 // We might not have complete headers yet. 353 // We might not have complete headers yet.
353 return ERR_INCOMPLETE_SPDY_HEADERS; 354 return ERR_INCOMPLETE_SPDY_HEADERS;
354 } 355 }
355 356
356 response_headers_received_ = true; 357 response_headers_received_ = true;
357 // Don't store the SSLInfo in the response here, HttpNetworkTransaction 358 // Don't store the SSLInfo in the response here, HttpNetworkTransaction
358 // will take care of that part. 359 // will take care of that part.
359 SSLInfo ssl_info; 360 SSLInfo ssl_info;
360 NextProto protocol_negotiated = kProtoUnknown; 361 NextProto protocol_negotiated = kProtoUnknown;
361 stream_->GetSSLInfo(&ssl_info, 362 stream_->GetSSLInfo(&ssl_info,
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 bool SpdyHttpStream::IsSpdyHttpStream() const { 506 bool SpdyHttpStream::IsSpdyHttpStream() const {
506 return true; 507 return true;
507 } 508 }
508 509
509 void SpdyHttpStream::Drain(HttpNetworkSession* session) { 510 void SpdyHttpStream::Drain(HttpNetworkSession* session) {
510 Close(false); 511 Close(false);
511 delete this; 512 delete this;
512 } 513 }
513 514
514 } // namespace net 515 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket_pool_spdy3_unittest.cc ('k') | net/spdy/spdy_http_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698