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/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1526 // ERR_EMPTY_RESPONSE. This may still be close/reuse race if the socket was | 1526 // ERR_EMPTY_RESPONSE. This may still be close/reuse race if the socket was |
1527 // preconnected but failed to be used before the server timed it out. | 1527 // preconnected but failed to be used before the server timed it out. |
1528 case ERR_EMPTY_RESPONSE: | 1528 case ERR_EMPTY_RESPONSE: |
1529 if (ShouldResendRequest()) { | 1529 if (ShouldResendRequest()) { |
1530 net_log_.AddEventWithNetErrorCode( | 1530 net_log_.AddEventWithNetErrorCode( |
1531 NetLogEventType::HTTP_TRANSACTION_RESTART_AFTER_ERROR, error); | 1531 NetLogEventType::HTTP_TRANSACTION_RESTART_AFTER_ERROR, error); |
1532 ResetConnectionAndRequestForResend(); | 1532 ResetConnectionAndRequestForResend(); |
1533 error = OK; | 1533 error = OK; |
1534 } | 1534 } |
1535 break; | 1535 break; |
1536 case ERR_QUIC_BROKEN_ERROR: | |
1537 if (GetResponseHeaders() == nullptr) { | |
1538 net_log_.AddEventWithNetErrorCode( | |
1539 NetLogEventType::HTTP_TRANSACTION_RESTART_AFTER_ERROR, error); | |
1540 ResetConnectionAndRequestForResend(); | |
1541 error = OK; | |
1542 break; | |
1543 } | |
1544 error = ERR_QUIC_PROTOCOL_ERROR; | |
mmenke
2017/04/03 18:47:47
I don't think this is meant to fall through. Shou
mmenke
2017/04/03 18:48:34
Also, a comment on what one error is being replace
Ryan Hamilton
2017/04/05 19:26:20
Agreed. Though this has been reworked and is now m
Ryan Hamilton
2017/04/05 19:26:20
*facepalm* Yes indeed :( Thanks!
| |
1536 case ERR_SPDY_PING_FAILED: | 1545 case ERR_SPDY_PING_FAILED: |
1537 case ERR_SPDY_SERVER_REFUSED_STREAM: | 1546 case ERR_SPDY_SERVER_REFUSED_STREAM: |
1538 case ERR_QUIC_HANDSHAKE_FAILED: | 1547 case ERR_QUIC_HANDSHAKE_FAILED: |
1539 net_log_.AddEventWithNetErrorCode( | 1548 net_log_.AddEventWithNetErrorCode( |
1540 NetLogEventType::HTTP_TRANSACTION_RESTART_AFTER_ERROR, error); | 1549 NetLogEventType::HTTP_TRANSACTION_RESTART_AFTER_ERROR, error); |
1541 ResetConnectionAndRequestForResend(); | 1550 ResetConnectionAndRequestForResend(); |
1542 error = OK; | 1551 error = OK; |
1543 break; | 1552 break; |
1544 case ERR_MISDIRECTED_REQUEST: | 1553 case ERR_MISDIRECTED_REQUEST: |
1545 // If this is the second try, just give up. | 1554 // If this is the second try, just give up. |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1712 DCHECK(stream_request_); | 1721 DCHECK(stream_request_); |
1713 | 1722 |
1714 // Since the transaction can restart with auth credentials, it may create a | 1723 // Since the transaction can restart with auth credentials, it may create a |
1715 // stream more than once. Accumulate all of the connection attempts across | 1724 // stream more than once. Accumulate all of the connection attempts across |
1716 // those streams by appending them to the vector: | 1725 // those streams by appending them to the vector: |
1717 for (const auto& attempt : stream_request_->connection_attempts()) | 1726 for (const auto& attempt : stream_request_->connection_attempts()) |
1718 connection_attempts_.push_back(attempt); | 1727 connection_attempts_.push_back(attempt); |
1719 } | 1728 } |
1720 | 1729 |
1721 } // namespace net | 1730 } // namespace net |
OLD | NEW |