| 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 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 return ERR_CONNECTION_CLOSED; | 884 return ERR_CONNECTION_CLOSED; |
| 885 | 885 |
| 886 // Explicit stream error are always fatal. | 886 // Explicit stream error are always fatal. |
| 887 if (quic_stream_error_ != QUIC_STREAM_NO_ERROR && | 887 if (quic_stream_error_ != QUIC_STREAM_NO_ERROR && |
| 888 quic_stream_error_ != QUIC_STREAM_CONNECTION_ERROR) { | 888 quic_stream_error_ != QUIC_STREAM_CONNECTION_ERROR) { |
| 889 return ERR_QUIC_PROTOCOL_ERROR; | 889 return ERR_QUIC_PROTOCOL_ERROR; |
| 890 } | 890 } |
| 891 | 891 |
| 892 DCHECK_NE(QUIC_HANDSHAKE_TIMEOUT, quic_connection_error_); | 892 DCHECK_NE(QUIC_HANDSHAKE_TIMEOUT, quic_connection_error_); |
| 893 | 893 |
| 894 // If the headers have not been received and QUIC is now broken, return | |
| 895 // ERR_QUIC_BROKEN_ERROR to permit HttpNetworkTransaction to retry the request | |
| 896 // over TCP. | |
| 897 if (!response_headers_received_ && | |
| 898 http_server_properties_->IsAlternativeServiceBroken(AlternativeService( | |
| 899 kProtoQUIC, server_id_.host(), server_id_.port()))) { | |
| 900 return ERR_QUIC_BROKEN_ERROR; | |
| 901 } | |
| 902 | |
| 903 return ERR_QUIC_PROTOCOL_ERROR; | 894 return ERR_QUIC_PROTOCOL_ERROR; |
| 904 } | 895 } |
| 905 | 896 |
| 906 } // namespace net | 897 } // namespace net |
| OLD | NEW |