[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
Ryan Hamilton | a3ee93a7 | 2018-08-01 22:03:08 | [diff] [blame] | 5 | #ifndef NET_QUIC_QUIC_HTTP_STREAM_H_ |
| 6 | #define NET_QUIC_QUIC_HTTP_STREAM_H_ |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 7 | |
Avi Drissman | 13fc893 | 2015-12-20 04:40:46 | [diff] [blame] | 8 | #include <stddef.h> |
sclittle | be1ccf6 | 2015-09-02 19:40:36 | [diff] [blame] | 9 | #include <stdint.h> |
| 10 | |
Eric Orth | ac66191 | 2022-01-10 21:44:17 | [diff] [blame] | 11 | #include <set> |
bnc | 614a92d3 | 2016-04-04 13:56:07 | [diff] [blame] | 12 | #include <string> |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 13 | |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame] | 14 | #include "base/memory/raw_ptr.h" |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 15 | #include "base/memory/weak_ptr.h" |
Bence Béky | 334ddfc2 | 2021-03-12 15:18:13 | [diff] [blame] | 16 | #include "base/strings/string_piece.h" |
Gabriel Charette | d87f10f | 2022-03-31 00:44:22 | [diff] [blame] | 17 | #include "base/time/time.h" |
Bence Béky | a25e3f7 | 2018-02-13 21:13:39 | [diff] [blame] | 18 | #include "net/base/completion_once_callback.h" |
Yu Su | ba2a1d7 | 2020-12-04 02:14:41 | [diff] [blame] | 19 | #include "net/base/idempotency.h" |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 20 | #include "net/base/io_buffer.h" |
xunjieli | 100937eb5 | 2016-09-15 20:09:37 | [diff] [blame] | 21 | #include "net/base/load_timing_info.h" |
bnc | 81c46c1f | 2016-10-04 16:25:59 | [diff] [blame] | 22 | #include "net/base/net_export.h" |
bnc | 90be5dd78 | 2016-11-09 16:28:44 | [diff] [blame] | 23 | #include "net/http/http_response_info.h" |
rch | 1d3b31a | 2017-03-29 20:34:17 | [diff] [blame] | 24 | #include "net/http/http_server_properties.h" |
mikecirone | f22f981 | 2016-10-04 03:40:19 | [diff] [blame] | 25 | #include "net/log/net_log_with_source.h" |
Ryan Hamilton | a3ee93a7 | 2018-08-01 22:03:08 | [diff] [blame] | 26 | #include "net/quic/quic_chromium_client_session.h" |
| 27 | #include "net/quic/quic_chromium_client_stream.h" |
Bence Béky | 94658bf | 2018-05-11 19:22:58 | [diff] [blame] | 28 | #include "net/spdy/multiplexed_http_stream.h" |
Ryan Hamilton | ea4fa19 | 2022-04-12 18:30:49 | [diff] [blame] | 29 | #include "net/third_party/quiche/src/quiche/quic/core/http/quic_client_push_promise_index.h" |
| 30 | #include "net/third_party/quiche/src/quiche/quic/core/quic_packets.h" |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 31 | |
| 32 | namespace net { |
| 33 | |
[email protected] | 24e5bc5 | 2013-09-18 15:36:58 | [diff] [blame] | 34 | namespace test { |
| 35 | class QuicHttpStreamPeer; |
| 36 | } // namespace test |
| 37 | |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 38 | // The QuicHttpStream is a QUIC-specific HttpStream subclass. It holds a |
Kenichi Ishibashi | 5153f063 | 2021-03-11 14:10:11 | [diff] [blame] | 39 | // handle of QuicChromiumClientStream which it uses to send and receive data. |
| 40 | // The handle hides the details of the underlying stream's lifetime and can be |
| 41 | // used even after the underlying stream is destroyed. |
rch | 56ec40a | 2017-06-23 14:48:44 | [diff] [blame] | 42 | class NET_EXPORT_PRIVATE QuicHttpStream : public MultiplexedHttpStream { |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 43 | public: |
zhongyi | 98d6a926 | 2017-05-19 02:47:45 | [diff] [blame] | 44 | explicit QuicHttpStream( |
Cammie Smith Barnes | 0f38aff | 2021-03-02 23:14:35 | [diff] [blame] | 45 | std::unique_ptr<QuicChromiumClientSession::Handle> session, |
Eric Orth | ac66191 | 2022-01-10 21:44:17 | [diff] [blame] | 46 | std::set<std::string> dns_aliases); |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 47 | |
Peter Boström | 293b134 | 2021-09-22 17:31:43 | [diff] [blame] | 48 | QuicHttpStream(const QuicHttpStream&) = delete; |
| 49 | QuicHttpStream& operator=(const QuicHttpStream&) = delete; |
| 50 | |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 51 | ~QuicHttpStream() override; |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 52 | |
| 53 | // HttpStream implementation. |
Ali Beyad | a0b1a1c | 2022-04-08 20:08:14 | [diff] [blame] | 54 | void RegisterRequest(const HttpRequestInfo* request_info) override; |
| 55 | int InitializeStream(bool can_send_early, |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 56 | RequestPriority priority, |
tfarina | 4283411 | 2016-09-22 13:38:20 | [diff] [blame] | 57 | const NetLogWithSource& net_log, |
Bence Béky | a25e3f7 | 2018-02-13 21:13:39 | [diff] [blame] | 58 | CompletionOnceCallback callback) override; |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 59 | int SendRequest(const HttpRequestHeaders& request_headers, |
| 60 | HttpResponseInfo* response, |
Bence Béky | a25e3f7 | 2018-02-13 21:13:39 | [diff] [blame] | 61 | CompletionOnceCallback callback) override; |
| 62 | int ReadResponseHeaders(CompletionOnceCallback callback) override; |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 63 | int ReadResponseBody(IOBuffer* buf, |
| 64 | int buf_len, |
Bence Béky | a25e3f7 | 2018-02-13 21:13:39 | [diff] [blame] | 65 | CompletionOnceCallback callback) override; |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 66 | void Close(bool not_reusable) override; |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 67 | bool IsResponseBodyComplete() const override; |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 68 | bool IsConnectionReused() const override; |
sclittle | 4de1bab9 | 2015-09-22 21:28:24 | [diff] [blame] | 69 | int64_t GetTotalReceivedBytes() const override; |
sclittle | be1ccf6 | 2015-09-02 19:40:36 | [diff] [blame] | 70 | int64_t GetTotalSentBytes() const override; |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 71 | bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; |
rch | cd37901 | 2017-04-12 21:53:32 | [diff] [blame] | 72 | bool GetAlternativeService( |
| 73 | AlternativeService* alternative_service) const override; |
zhongyi | ca364fbb | 2015-12-12 03:39:12 | [diff] [blame] | 74 | void PopulateNetErrorDetails(NetErrorDetails* details) override; |
dcheng | b03027d | 2014-10-21 12:00:20 | [diff] [blame] | 75 | void SetPriority(RequestPriority priority) override; |
Yu Su | ba2a1d7 | 2020-12-04 02:14:41 | [diff] [blame] | 76 | void SetRequestIdempotency(Idempotency idempotency) override; |
Eric Orth | ac66191 | 2022-01-10 21:44:17 | [diff] [blame] | 77 | const std::set<std::string>& GetDnsAliases() const override; |
Bence Béky | 334ddfc2 | 2021-03-12 15:18:13 | [diff] [blame] | 78 | base::StringPiece GetAcceptChViaAlps() const override; |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 79 | |
bnc | 90be5dd78 | 2016-11-09 16:28:44 | [diff] [blame] | 80 | static HttpResponseInfo::ConnectionInfo ConnectionInfoFromQuicVersion( |
Nick Harper | 63da942 | 2019-10-22 22:41:08 | [diff] [blame] | 81 | quic::ParsedQuicVersion quic_version); |
bnc | 90be5dd78 | 2016-11-09 16:28:44 | [diff] [blame] | 82 | |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 83 | private: |
[email protected] | 24e5bc5 | 2013-09-18 15:36:58 | [diff] [blame] | 84 | friend class test::QuicHttpStreamPeer; |
| 85 | |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 86 | enum State { |
| 87 | STATE_NONE, |
rch | a08ce10 | 2016-09-15 00:39:47 | [diff] [blame] | 88 | STATE_HANDLE_PROMISE, |
| 89 | STATE_HANDLE_PROMISE_COMPLETE, |
ckrasic | 3865ee0f | 2016-02-29 22:04:56 | [diff] [blame] | 90 | STATE_REQUEST_STREAM, |
rch | a08ce10 | 2016-09-15 00:39:47 | [diff] [blame] | 91 | STATE_REQUEST_STREAM_COMPLETE, |
ckrasic | 3865ee0f | 2016-02-29 22:04:56 | [diff] [blame] | 92 | STATE_SET_REQUEST_PRIORITY, |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 93 | STATE_SEND_HEADERS, |
| 94 | STATE_SEND_HEADERS_COMPLETE, |
| 95 | STATE_READ_REQUEST_BODY, |
| 96 | STATE_READ_REQUEST_BODY_COMPLETE, |
| 97 | STATE_SEND_BODY, |
| 98 | STATE_SEND_BODY_COMPLETE, |
| 99 | STATE_OPEN, |
| 100 | }; |
| 101 | |
| 102 | void OnIOComplete(int rv); |
| 103 | void DoCallback(int rv); |
| 104 | |
bnc | 614a92d3 | 2016-04-04 13:56:07 | [diff] [blame] | 105 | int DoLoop(int rv); |
rch | a08ce10 | 2016-09-15 00:39:47 | [diff] [blame] | 106 | int DoHandlePromise(); |
| 107 | int DoHandlePromiseComplete(int rv); |
| 108 | int DoRequestStream(); |
| 109 | int DoRequestStreamComplete(int rv); |
ckrasic | 3865ee0f | 2016-02-29 22:04:56 | [diff] [blame] | 110 | int DoSetRequestPriority(); |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 111 | int DoSendHeaders(); |
| 112 | int DoSendHeadersComplete(int rv); |
| 113 | int DoReadRequestBody(); |
| 114 | int DoReadRequestBodyComplete(int rv); |
| 115 | int DoSendBody(); |
| 116 | int DoSendBodyComplete(int rv); |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 117 | |
rch | fb47f71 | 2017-05-21 03:24:00 | [diff] [blame] | 118 | void OnReadResponseHeadersComplete(int rv); |
Bence Béky | 4c325e5 | 2020-10-22 20:48:01 | [diff] [blame] | 119 | int ProcessResponseHeaders(const spdy::Http2HeaderBlock& headers); |
rch | ce24641 | 2017-05-30 13:51:50 | [diff] [blame] | 120 | void ReadTrailingHeaders(); |
| 121 | void OnReadTrailingHeadersComplete(int rv); |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 122 | |
rch | 27da045 | 2017-05-26 22:54:54 | [diff] [blame] | 123 | void OnReadBodyComplete(int rv); |
| 124 | int HandleReadComplete(int rv); |
| 125 | |
ckrasic | 3865ee0f | 2016-02-29 22:04:56 | [diff] [blame] | 126 | void EnterStateSendHeaders(); |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 127 | |
rtenneti | 1e777fa0 | 2015-08-26 00:10:16 | [diff] [blame] | 128 | void ResetStream(); |
| 129 | |
rch | 1bcfddf2 | 2017-06-03 00:26:29 | [diff] [blame] | 130 | // Returns ERR_QUIC_HANDSHAKE_FAILED, if |rv| is ERR_QUIC_PROTOCOL_ERROR and |
| 131 | // the handshake was never confirmed. Otherwise, returns |rv|. |
| 132 | int MapStreamError(int rv); |
| 133 | |
rch | 4cbd5e2 | 2017-03-30 00:13:29 | [diff] [blame] | 134 | // If |has_response_status_| is false, sets |response_status| to the result |
| 135 | // of ComputeResponseStatus(). Returns |response_status_|. |
| 136 | int GetResponseStatus(); |
| 137 | // Sets the result of |ComputeResponseStatus()| as the |response_status_|. |
| 138 | void SaveResponseStatus(); |
| 139 | // Sets |response_status_| to |response_status| and sets |
| 140 | // |has_response_status_| to true. |
| 141 | void SetResponseStatus(int response_status); |
| 142 | // Computes the correct response status based on the status of the handshake, |
| 143 | // |session_error|, |connection_error| and |stream_error|. |
| 144 | int ComputeResponseStatus() const; |
| 145 | |
rch | f0b18c8a | 2017-05-05 19:31:57 | [diff] [blame] | 146 | QuicChromiumClientSession::Handle* quic_session() { |
| 147 | return static_cast<QuicChromiumClientSession::Handle*>(session()); |
| 148 | } |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 149 | |
rch | f0b18c8a | 2017-05-05 19:31:57 | [diff] [blame] | 150 | const QuicChromiumClientSession::Handle* quic_session() const { |
| 151 | return static_cast<const QuicChromiumClientSession::Handle*>(session()); |
| 152 | } |
| 153 | |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 154 | State next_state_ = STATE_NONE; |
rch | 1d3b31a | 2017-03-29 20:34:17 | [diff] [blame] | 155 | |
rch | 08e19857 | 2017-05-09 16:56:55 | [diff] [blame] | 156 | std::unique_ptr<QuicChromiumClientStream::Handle> stream_; |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 157 | |
| 158 | // The following three fields are all owned by the caller and must |
| 159 | // outlive this object, according to the HttpStream contract. |
| 160 | |
| 161 | // The request to send. |
shivanisha | 0b44085 | 2016-10-18 15:48:15 | [diff] [blame] | 162 | // Only valid before the response body is read. |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame] | 163 | raw_ptr<const HttpRequestInfo> request_info_; |
shivanisha | 0b44085 | 2016-10-18 15:48:15 | [diff] [blame] | 164 | |
Steven Valdez | b4ff041 | 2018-01-18 22:39:27 | [diff] [blame] | 165 | // Whether this request can be sent without confirmation. |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 166 | bool can_send_early_ = false; |
Steven Valdez | b4ff041 | 2018-01-18 22:39:27 | [diff] [blame] | 167 | |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 168 | // The request body to send, if any, owned by the caller. |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame] | 169 | raw_ptr<UploadDataStream> request_body_stream_; |
[email protected] | 6ed6743 | 2014-06-24 01:53:53 | [diff] [blame] | 170 | // Time the request was issued. |
| 171 | base::Time request_time_; |
[email protected] | 24e5bc5 | 2013-09-18 15:36:58 | [diff] [blame] | 172 | // The priority of the request. |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 173 | RequestPriority priority_ = MINIMUM_PRIORITY; |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 174 | // |response_info_| is the HTTP response data object which is filled in |
| 175 | // when a the response headers are read. It is not owned by this stream. |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame] | 176 | raw_ptr<HttpResponseInfo> response_info_; |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 177 | bool has_response_status_ = false; // true if response_status_ as been set. |
[email protected] | 56dfb90 | 2013-01-03 23:17:55 | [diff] [blame] | 178 | // Because response data is buffered, also buffer the response status if the |
| 179 | // stream is explicitly closed via OnError or OnClose with an error. |
| 180 | // Once all buffered data has been returned, this will be used as the final |
| 181 | // response. |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 182 | int response_status_ = ERR_UNEXPECTED; |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 183 | |
[email protected] | 13428d4 | 2013-11-26 18:50:36 | [diff] [blame] | 184 | // Serialized request headers. |
Bence Béky | 4c325e5 | 2020-10-22 20:48:01 | [diff] [blame] | 185 | spdy::Http2HeaderBlock request_headers_; |
[email protected] | 13428d4 | 2013-11-26 18:50:36 | [diff] [blame] | 186 | |
Bence Béky | 4c325e5 | 2020-10-22 20:48:01 | [diff] [blame] | 187 | spdy::Http2HeaderBlock response_header_block_; |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 188 | bool response_headers_received_ = false; |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 189 | |
Bence Béky | 4c325e5 | 2020-10-22 20:48:01 | [diff] [blame] | 190 | spdy::Http2HeaderBlock trailing_header_block_; |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 191 | bool trailing_headers_received_ = false; |
rch | ce24641 | 2017-05-30 13:51:50 | [diff] [blame] | 192 | |
sclittle | c4dc1a3 | 2015-09-24 00:15:45 | [diff] [blame] | 193 | // Number of bytes received by the headers stream on behalf of this stream. |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 194 | int64_t headers_bytes_received_ = 0; |
sclittle | c4dc1a3 | 2015-09-24 00:15:45 | [diff] [blame] | 195 | // Number of bytes sent by the headers stream on behalf of this stream. |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 196 | int64_t headers_bytes_sent_ = 0; |
sclittle | c4dc1a3 | 2015-09-24 00:15:45 | [diff] [blame] | 197 | |
[email protected] | 14cfbd6 | 2014-01-23 22:59:15 | [diff] [blame] | 198 | // Number of bytes received when the stream was closed. |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 199 | int64_t closed_stream_received_bytes_ = 0; |
sclittle | 1edeeb2 | 2015-09-02 20:46:10 | [diff] [blame] | 200 | // Number of bytes sent when the stream was closed. |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 201 | int64_t closed_stream_sent_bytes_ = 0; |
xunjieli | 100937eb5 | 2016-09-15 20:09:37 | [diff] [blame] | 202 | // True if the stream is the first stream negotiated on the session. Set when |
| 203 | // the stream was closed. If |stream_| is failed to be created, this takes on |
| 204 | // the default value of false. |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 205 | bool closed_is_first_stream_ = false; |
[email protected] | 14cfbd6 | 2014-01-23 22:59:15 | [diff] [blame] | 206 | |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 207 | // The caller's callback to be used for asynchronous operations. |
Bence Béky | a25e3f7 | 2018-02-13 21:13:39 | [diff] [blame] | 208 | CompletionOnceCallback callback_; |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 209 | |
| 210 | // Caller provided buffer for the ReadResponseBody() response. |
| 211 | scoped_refptr<IOBuffer> user_buffer_; |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 212 | int user_buffer_len_ = 0; |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 213 | |
| 214 | // Temporary buffer used to read the request body from UploadDataStream. |
| 215 | scoped_refptr<IOBufferWithSize> raw_request_body_buf_; |
| 216 | // Wraps raw_request_body_buf_ to read the remaining data progressively. |
| 217 | scoped_refptr<DrainableIOBuffer> request_body_buf_; |
| 218 | |
tfarina | 4283411 | 2016-09-22 13:38:20 | [diff] [blame] | 219 | NetLogWithSource stream_net_log_; |
[email protected] | 0d10b59 | 2013-02-14 16:09:26 | [diff] [blame] | 220 | |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 221 | int session_error_ = |
| 222 | ERR_UNEXPECTED; // Error code from the connection shutdown. |
zhongyi | ca364fbb | 2015-12-12 03:39:12 | [diff] [blame] | 223 | |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 224 | bool found_promise_ = false; |
ckrasic | 3865ee0f | 2016-02-29 22:04:56 | [diff] [blame] | 225 | |
xunjieli | 1f48e6e | 2016-07-13 22:53:04 | [diff] [blame] | 226 | // Set to true when DoLoop() is being executed, false otherwise. |
Tsuyoshi Horo | 4478fd3 | 2022-06-09 01:41:25 | [diff] [blame] | 227 | bool in_loop_ = false; |
xunjieli | 1f48e6e | 2016-07-13 22:53:04 | [diff] [blame] | 228 | |
xunjieli | 100937eb5 | 2016-09-15 20:09:37 | [diff] [blame] | 229 | // Session connect timing info. |
| 230 | LoadTimingInfo::ConnectTiming connect_timing_; |
| 231 | |
Eric Orth | ac66191 | 2022-01-10 21:44:17 | [diff] [blame] | 232 | // Stores any DNS aliases for the remote endpoint. Includes all known |
| 233 | // aliases, e.g. from A, AAAA, or HTTPS, not just from the address used for |
| 234 | // the connection, in no particular order. These are stored in the stream |
| 235 | // instead of the session due to complications related to IP-pooling. |
| 236 | std::set<std::string> dns_aliases_; |
Cammie Smith Barnes | 0f38aff | 2021-03-02 23:14:35 | [diff] [blame] | 237 | |
Jeremy Roman | d54000b2 | 2019-07-08 18:40:16 | [diff] [blame] | 238 | base::WeakPtrFactory<QuicHttpStream> weak_factory_{this}; |
[email protected] | f702d57 | 2012-12-04 15:56:20 | [diff] [blame] | 239 | }; |
| 240 | |
| 241 | } // namespace net |
| 242 | |
Ryan Hamilton | a3ee93a7 | 2018-08-01 22:03:08 | [diff] [blame] | 243 | #endif // NET_QUIC_QUIC_HTTP_STREAM_H_ |