OLD | NEW |
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/quic/chromium/quic_http_stream.h" | 5 #include "net/quic/chromium/quic_http_stream.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 DLOG(WARNING) << "Invalid headers"; | 783 DLOG(WARNING) << "Invalid headers"; |
784 return ERR_QUIC_PROTOCOL_ERROR; | 784 return ERR_QUIC_PROTOCOL_ERROR; |
785 } | 785 } |
786 // Put the peer's IP address and port into the response. | 786 // Put the peer's IP address and port into the response. |
787 IPEndPoint address = session_->peer_address(); | 787 IPEndPoint address = session_->peer_address(); |
788 response_info_->socket_address = HostPortPair::FromIPEndPoint(address); | 788 response_info_->socket_address = HostPortPair::FromIPEndPoint(address); |
789 response_info_->connection_info = | 789 response_info_->connection_info = |
790 HttpResponseInfo::CONNECTION_INFO_QUIC1_SPDY3; | 790 HttpResponseInfo::CONNECTION_INFO_QUIC1_SPDY3; |
791 response_info_->vary_data.Init(*request_info_, | 791 response_info_->vary_data.Init(*request_info_, |
792 *response_info_->headers.get()); | 792 *response_info_->headers.get()); |
793 response_info_->was_npn_negotiated = true; | 793 response_info_->was_alpn_negotiated = true; |
794 response_info_->npn_negotiated_protocol = "quic/1+spdy/3"; | 794 response_info_->alpn_negotiated_protocol = "quic/1+spdy/3"; |
795 response_info_->response_time = base::Time::Now(); | 795 response_info_->response_time = base::Time::Now(); |
796 response_info_->request_time = request_time_; | 796 response_info_->request_time = request_time_; |
797 response_headers_received_ = true; | 797 response_headers_received_ = true; |
798 | 798 |
799 // Populate |connect_timing_| when response headers are received. This should | 799 // Populate |connect_timing_| when response headers are received. This should |
800 // take care of 0-RTT where request is sent before handshake is confirmed. | 800 // take care of 0-RTT where request is sent before handshake is confirmed. |
801 connect_timing_ = session_->GetConnectTiming(); | 801 connect_timing_ = session_->GetConnectTiming(); |
802 return OK; | 802 return OK; |
803 } | 803 } |
804 | 804 |
(...skipping 26 matching lines...) Expand all Loading... |
831 closed_is_first_stream_ = stream_->IsFirstStream(); | 831 closed_is_first_stream_ = stream_->IsFirstStream(); |
832 stream_ = nullptr; | 832 stream_ = nullptr; |
833 | 833 |
834 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress | 834 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress |
835 // read. | 835 // read. |
836 if (request_body_stream_) | 836 if (request_body_stream_) |
837 request_body_stream_->Reset(); | 837 request_body_stream_->Reset(); |
838 } | 838 } |
839 | 839 |
840 } // namespace net | 840 } // namespace net |
OLD | NEW |