Repository: trafficserver
Updated Branches:
  refs/heads/master 7b0a57f43 -> 0b2c2f96d


TS-3440: Connect retries shouldn't happen if the connection has succeeeded and 
data has been sent


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/440a1451
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/440a1451
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/440a1451

Branch: refs/heads/master
Commit: 440a14513e59baf21e55b07f0dd4aa39bac232de
Parents: 65fa4ec
Author: Brian Geffon <[email protected]>
Authored: Thu Jul 2 00:08:11 2015 -0700
Committer: Brian Geffon <[email protected]>
Committed: Thu Jul 2 00:08:11 2015 -0700

----------------------------------------------------------------------
 proxy/http/HttpTransact.cc | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/440a1451/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 59ee0fc..06870ae 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -3643,6 +3643,17 @@ HttpTransact::handle_response_from_server(State *s)
     s->current.server->set_connect_fail(EUSERS); // too many users
     handle_server_connection_not_open(s);
     break;
+  case CONNECTION_CLOSED:
+    /* fall through */
+  case PARSE_ERROR:
+    /* fall through */
+  case BAD_INCOMING_RESPONSE: {
+    // this case should not be allowed to retry because we'll end up making 
another request
+    DebugTxn("http_trans", "[handle_response_from_server] Transaction received 
a bad response or a partial response, not retrying...");
+    SET_VIA_STRING(VIA_DETAIL_SERVER_CONNECT, VIA_DETAIL_SERVER_FAILURE);
+    handle_server_connection_not_open(s);
+    break;
+  }
   case OPEN_RAW_ERROR:
   /* fall through */
   case CONNECTION_ERROR:
@@ -3650,12 +3661,6 @@ HttpTransact::handle_response_from_server(State *s)
   case STATE_UNDEFINED:
   /* fall through */
   case INACTIVE_TIMEOUT:
-  /* fall through */
-  case PARSE_ERROR:
-  /* fall through */
-  case CONNECTION_CLOSED:
-  /* fall through */
-  case BAD_INCOMING_RESPONSE:
     // Set to generic I/O error if not already set specifically.
     if (!s->current.server->had_connect_fail())
       s->current.server->set_connect_fail(EIO);

Reply via email to