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/tools/quic/quic_spdy_client_stream.h" | 5 #include "net/tools/quic/quic_spdy_client_stream.h" |
6 | 6 |
7 #include "net/spdy/spdy_framer.h" | 7 #include "net/spdy/spdy_framer.h" |
8 #include "net/tools/quic/quic_client_session.h" | 8 #include "net/tools/quic/quic_client_session.h" |
9 #include "net/tools/quic/spdy_utils.h" | 9 #include "net/tools/quic/spdy_utils.h" |
10 | 10 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 size_t len = framer.ParseHeaderBlockInBuffer(data, read_buf_->offset(), | 84 size_t len = framer.ParseHeaderBlockInBuffer(data, read_buf_->offset(), |
85 &headers); | 85 &headers); |
86 if (len == 0) { | 86 if (len == 0) { |
87 return -1; | 87 return -1; |
88 } | 88 } |
89 | 89 |
90 if (!SpdyUtils::FillBalsaResponseHeaders(headers, mutable_headers())) { | 90 if (!SpdyUtils::FillBalsaResponseHeaders(headers, mutable_headers())) { |
91 Close(QUIC_BAD_APPLICATION_PAYLOAD); | 91 Close(QUIC_BAD_APPLICATION_PAYLOAD); |
92 return -1; | 92 return -1; |
93 } | 93 } |
| 94 response_headers_received_ = true; |
94 | 95 |
95 size_t delta = read_buf_len - len; | 96 size_t delta = read_buf_len - len; |
96 if (delta > 0) { | 97 if (delta > 0) { |
97 mutable_data()->append(data + len, delta); | 98 mutable_data()->append(data + len, delta); |
98 } | 99 } |
99 | 100 |
100 return len; | 101 return len; |
101 } | 102 } |
102 | 103 |
103 } // namespace tools | 104 } // namespace tools |
104 } // namespace net | 105 } // namespace net |
OLD | NEW |