renjietang | d21094b | 2019-06-14 09:39:11 -0700 | [diff] [blame] | 1 | // Copyright 2019 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 | |
| 5 | #include "net/third_party/quiche/src/quic/core/qpack/qpack_receive_stream.h" |
| 6 | |
| 7 | #include "net/third_party/quiche/src/quic/core/http/quic_spdy_session.h" |
| 8 | |
| 9 | namespace quic { |
| 10 | QpackReceiveStream::QpackReceiveStream(PendingStream* pending) |
| 11 | : QuicStream(pending, READ_UNIDIRECTIONAL, /*is_static=*/true) {} |
| 12 | |
dschinazi | 17d4242 | 2019-06-18 16:35:07 -0700 | [diff] [blame^] | 13 | void QpackReceiveStream::OnStreamReset(const QuicRstStreamFrame& /*frame*/) { |
renjietang | d21094b | 2019-06-14 09:39:11 -0700 | [diff] [blame] | 14 | // TODO(renjietang) Change the error code to H/3 specific |
| 15 | // HTTP_CLOSED_CRITICAL_STREAM. |
| 16 | session()->connection()->CloseConnection( |
| 17 | QUIC_INVALID_STREAM_ID, "Attempt to reset Qpack receive stream", |
| 18 | ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); |
| 19 | } |
| 20 | |
| 21 | } // namespace quic |