| 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 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1541 // ERR_EMPTY_RESPONSE. This may still be close/reuse race if the socket was | 1541 // ERR_EMPTY_RESPONSE. This may still be close/reuse race if the socket was |
| 1542 // preconnected but failed to be used before the server timed it out. | 1542 // preconnected but failed to be used before the server timed it out. |
| 1543 case ERR_EMPTY_RESPONSE: | 1543 case ERR_EMPTY_RESPONSE: |
| 1544 if (ShouldResendRequest()) { | 1544 if (ShouldResendRequest()) { |
| 1545 net_log_.AddEventWithNetErrorCode( | 1545 net_log_.AddEventWithNetErrorCode( |
| 1546 NetLogEventType::HTTP_TRANSACTION_RESTART_AFTER_ERROR, error); | 1546 NetLogEventType::HTTP_TRANSACTION_RESTART_AFTER_ERROR, error); |
| 1547 ResetConnectionAndRequestForResend(); | 1547 ResetConnectionAndRequestForResend(); |
| 1548 error = OK; | 1548 error = OK; |
| 1549 } | 1549 } |
| 1550 break; | 1550 break; |
| 1551 case ERR_QUIC_BROKEN_ERROR: |
| 1552 DCHECK(GetResponseHeaders() == nullptr); |
| 1553 net_log_.AddEventWithNetErrorCode( |
| 1554 NetLogEventType::HTTP_TRANSACTION_RESTART_AFTER_ERROR, error); |
| 1555 ResetConnectionAndRequestForResend(); |
| 1556 error = OK; |
| 1557 break; |
| 1551 case ERR_SPDY_PING_FAILED: | 1558 case ERR_SPDY_PING_FAILED: |
| 1552 case ERR_SPDY_SERVER_REFUSED_STREAM: | 1559 case ERR_SPDY_SERVER_REFUSED_STREAM: |
| 1553 case ERR_QUIC_HANDSHAKE_FAILED: | 1560 case ERR_QUIC_HANDSHAKE_FAILED: |
| 1554 net_log_.AddEventWithNetErrorCode( | 1561 net_log_.AddEventWithNetErrorCode( |
| 1555 NetLogEventType::HTTP_TRANSACTION_RESTART_AFTER_ERROR, error); | 1562 NetLogEventType::HTTP_TRANSACTION_RESTART_AFTER_ERROR, error); |
| 1556 ResetConnectionAndRequestForResend(); | 1563 ResetConnectionAndRequestForResend(); |
| 1557 error = OK; | 1564 error = OK; |
| 1558 break; | 1565 break; |
| 1559 case ERR_MISDIRECTED_REQUEST: | 1566 case ERR_MISDIRECTED_REQUEST: |
| 1560 // If this is the second try, just give up. | 1567 // If this is the second try, just give up. |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1769 continue; | 1776 continue; |
| 1770 if (allowed_encodings.find(encoding) == allowed_encodings.end()) { | 1777 if (allowed_encodings.find(encoding) == allowed_encodings.end()) { |
| 1771 FilterSourceStream::ReportContentDecodingFailed(source_type); | 1778 FilterSourceStream::ReportContentDecodingFailed(source_type); |
| 1772 return false; | 1779 return false; |
| 1773 } | 1780 } |
| 1774 } | 1781 } |
| 1775 return true; | 1782 return true; |
| 1776 } | 1783 } |
| 1777 | 1784 |
| 1778 } // namespace net | 1785 } // namespace net |
| OLD | NEW |