Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_stream.h" | 5 #include "net/quic/quic_spdy_stream.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "net/quic/quic_bug_tracker.h" | 9 #include "net/quic/quic_bug_tracker.h" |
| 10 #include "net/quic/quic_spdy_session.h" | 10 #include "net/quic/quic_spdy_session.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 206 QUIC_INVALID_HEADERS_STREAM_DATA, "Trailers after fin"); | 206 QUIC_INVALID_HEADERS_STREAM_DATA, "Trailers after fin"); |
| 207 return; | 207 return; |
| 208 } | 208 } |
| 209 if (!fin) { | 209 if (!fin) { |
| 210 DLOG(ERROR) << "Trailers must have FIN set, on stream: " << id(); | 210 DLOG(ERROR) << "Trailers must have FIN set, on stream: " << id(); |
| 211 session()->connection()->SendConnectionCloseWithDetails( | 211 session()->connection()->SendConnectionCloseWithDetails( |
| 212 QUIC_INVALID_HEADERS_STREAM_DATA, "Fin missing from trailers"); | 212 QUIC_INVALID_HEADERS_STREAM_DATA, "Fin missing from trailers"); |
| 213 return; | 213 return; |
| 214 } | 214 } |
| 215 | 215 |
| 216 OnStreamFrame(QuicStreamFrame(id(), fin, stream_bytes_read(), StringPiece())); | |
|
Ryan Hamilton
2016/03/08 04:12:43
I thought that you and robbie agreed that this was
xunjieli
2016/03/08 14:46:02
Robbie and I agreed that we need to add a OnStream
| |
| 217 trailers_decompressed_ = true; | 216 trailers_decompressed_ = true; |
| 218 } | 217 } |
| 219 | 218 |
| 220 void QuicSpdyStream::OnStreamReset(const QuicRstStreamFrame& frame) { | 219 void QuicSpdyStream::OnStreamReset(const QuicRstStreamFrame& frame) { |
| 221 if (frame.error_code != QUIC_STREAM_NO_ERROR || | 220 if (frame.error_code != QUIC_STREAM_NO_ERROR || |
| 222 version() <= QUIC_VERSION_28) { | 221 version() <= QUIC_VERSION_28) { |
| 223 ReliableQuicStream::OnStreamReset(frame); | 222 ReliableQuicStream::OnStreamReset(frame); |
| 224 return; | 223 return; |
| 225 } | 224 } |
| 226 DVLOG(1) << "Received QUIC_STREAM_NO_ERROR, not discarding response"; | 225 DVLOG(1) << "Received QUIC_STREAM_NO_ERROR, not discarding response"; |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 250 // If no further trailing headers are expected, and the decompressed trailers | 249 // If no further trailing headers are expected, and the decompressed trailers |
| 251 // (if any) have been consumed, then reading of trailers is finished. | 250 // (if any) have been consumed, then reading of trailers is finished. |
| 252 bool no_more_trailers = fin_received() || trailers_decompressed_; | 251 bool no_more_trailers = fin_received() || trailers_decompressed_; |
| 253 return no_more_trailers && decompressed_trailers_.empty(); | 252 return no_more_trailers && decompressed_trailers_.empty(); |
| 254 } | 253 } |
| 255 | 254 |
| 256 SpdyPriority QuicSpdyStream::priority() const { | 255 SpdyPriority QuicSpdyStream::priority() const { |
| 257 return priority_; | 256 return priority_; |
| 258 } | 257 } |
| 259 } // namespace net | 258 } // namespace net |
| OLD | NEW |