OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1180 error = HandleSSLHandshakeError(error); | 1180 error = HandleSSLHandshakeError(error); |
1181 | 1181 |
1182 switch (error) { | 1182 switch (error) { |
1183 // If we try to reuse a connection that the server is in the process of | 1183 // If we try to reuse a connection that the server is in the process of |
1184 // closing, we may end up successfully writing out our request (or a | 1184 // closing, we may end up successfully writing out our request (or a |
1185 // portion of our request) only to find a connection error when we try to | 1185 // portion of our request) only to find a connection error when we try to |
1186 // read from (or finish writing to) the socket. | 1186 // read from (or finish writing to) the socket. |
1187 case ERR_CONNECTION_RESET: | 1187 case ERR_CONNECTION_RESET: |
1188 case ERR_CONNECTION_CLOSED: | 1188 case ERR_CONNECTION_CLOSED: |
1189 case ERR_CONNECTION_ABORTED: | 1189 case ERR_CONNECTION_ABORTED: |
1190 // Under certain circumstances, we may first learn a socket's been | |
willchan no longer on Chromium
2011/12/07 18:46:28
Can you describe the circumstance? Explain that th
mmenke
2011/12/07 19:34:11
Done. Added a link to the bug, too, as it now con
| |
1191 // disconnected when trying to read/write from it or get its IP address, | |
willchan no longer on Chromium
2011/12/07 18:46:28
getting the peer's IP address
mmenke
2011/12/07 19:34:11
Completely rewrote the sentence.
| |
1192 // before processing the connection closed/reset message. In this case, | |
1193 // we'll receive the following error code. | |
1194 case ERR_SOCKET_NOT_CONNECTED: | |
1190 if (ShouldResendRequest(error)) { | 1195 if (ShouldResendRequest(error)) { |
1191 net_log_.AddEvent( | 1196 net_log_.AddEvent( |
1192 NetLog::TYPE_HTTP_TRANSACTION_RESTART_AFTER_ERROR, | 1197 NetLog::TYPE_HTTP_TRANSACTION_RESTART_AFTER_ERROR, |
1193 make_scoped_refptr(new NetLogIntegerParameter("net_error", error))); | 1198 make_scoped_refptr(new NetLogIntegerParameter("net_error", error))); |
1194 ResetConnectionAndRequestForResend(); | 1199 ResetConnectionAndRequestForResend(); |
1195 error = OK; | 1200 error = OK; |
1196 } | 1201 } |
1197 break; | 1202 break; |
1198 case ERR_PIPELINE_EVICTION: | 1203 case ERR_PIPELINE_EVICTION: |
1199 case ERR_SPDY_PING_FAILED: | 1204 case ERR_SPDY_PING_FAILED: |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1340 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1345 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
1341 state); | 1346 state); |
1342 break; | 1347 break; |
1343 } | 1348 } |
1344 return description; | 1349 return description; |
1345 } | 1350 } |
1346 | 1351 |
1347 #undef STATE_CASE | 1352 #undef STATE_CASE |
1348 | 1353 |
1349 } // namespace net | 1354 } // namespace net |
OLD | NEW |