diff -up curl-7.19.6/include/curl/curl.h.orig curl-7.19.6/include/curl/curl.h
--- curl-7.19.6/include/curl/curl.h.orig	2009-12-17 09:23:18.000000000 -0500
+++ curl-7.19.6/include/curl/curl.h	2009-12-16 17:07:44.000000000 -0500
@@ -1263,6 +1263,9 @@ typedef enum {
   /* set the SSH host key callback custom pointer */
   CINIT(SSH_KEYDATA, OBJECTPOINT, 185),
 
+  /* Disable retries */
+  CINIT(DISABLE_RETRIES, LONG, 186),
+
   CURLOPT_LASTENTRY /* the last unused */
 } CURLoption;
 
diff -up curl-7.19.6/lib/transfer.c.orig curl-7.19.6/lib/transfer.c
--- curl-7.19.6/lib/transfer.c.orig	2009-12-17 09:24:17.000000000 -0500
+++ curl-7.19.6/lib/transfer.c	2009-12-17 11:18:59.000000000 -0500
@@ -2513,22 +2513,30 @@ bool Curl_retry_request(struct connectda
       data->req.headerbytecount == 0) &&
      conn->bits.reuse &&
      !data->set.opt_no_body) {
-    /* We got no data, we attempted to re-use a connection and yet we want a
-       "body". This might happen if the connection was left alive when we were
-       done using it before, but that was closed when we wanted to read from
-       it again. Bad luck. Retry the same request on a fresh connect! */
-    infof(conn->data, "Connection died, retrying a fresh connect\n");
-    *url = strdup(conn->data->change.url);
-
-    conn->bits.close = TRUE; /* close this connection */
-    conn->bits.retry = TRUE; /* mark this as a connection we're about
-                                to retry. Marking it this way should
-                                prevent i.e HTTP transfers to return
-                                error just because nothing has been
-                                transfered! */
-    retry = TRUE;
-  }
 
+    if (!data->set.disable_retries) {
+      /* We got no data, we attempted to re-use a connection and yet we want a
+         "body". This might happen if the connection was left alive when we were
+         done using it before, but that was closed when we wanted to read from
+         it again. Bad luck. Retry the same request on a fresh connect! */
+      infof(conn->data, "Connection died, retrying a fresh connect\n");
+      *url = strdup(conn->data->change.url);
+      
+      conn->bits.close = TRUE; /* close this connection */
+      conn->bits.retry = TRUE; /* mark this as a connection we're about
+                                  to retry. Marking it this way should
+                                  prevent i.e HTTP transfers to return
+                                  error just because nothing has been
+                                  transfered! */
+      retry = TRUE;
+    }
+    else {
+      infof(conn->data, "Skip retry due to the disable retries flag");
+      conn->bits.close = TRUE;
+      conn->bits.retry = FALSE;
+    }
+  }
+  
   return retry;
 }
 
diff -up curl-7.19.6/lib/url.c.orig curl-7.19.6/lib/url.c
--- curl-7.19.6/lib/url.c.orig	2009-12-17 09:23:58.000000000 -0500
+++ curl-7.19.6/lib/url.c	2009-12-16 17:11:23.000000000 -0500
@@ -2276,6 +2276,14 @@ CURLcode Curl_setopt(struct SessionHandl
     data->set.redir_protocols = va_arg(param, long) & PROT_EXTMASK;
     break;
 
+  case CURLOPT_DISABLE_RETRIES:
+
+    /* Disable retries for dead connections
+     */
+    data->set.disable_retries = (bool)(0 != va_arg(param, long));
+    break;
+
+
   default:
     /* unknown tag and its companion, just ignore: */
     result = CURLE_FAILED_INIT; /* correct this */
diff -up curl-7.19.6/lib/urldata.h.orig curl-7.19.6/lib/urldata.h
--- curl-7.19.6/lib/urldata.h.orig	2009-12-17 09:43:50.000000000 -0500
+++ curl-7.19.6/lib/urldata.h	2009-12-16 17:12:49.000000000 -0500
@@ -1565,6 +1565,7 @@ struct UserDefined {
 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
   long socks5_gssapi_nec; /* flag to support nec socks5 server */
 #endif
+  bool disable_retries; /* Disable retries on dead connections */
 };
 
 struct Names {
