aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-02-02 14:49:54 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-02-02 14:49:54 +0000
commitb84eaff1d57754e9d154fa7fc7bf941c9e430a31 (patch)
tree09bfd8de2f9df53e92736d5f5ea5151d4f0d3cd9 /lib/transfer.c
parent9eb6fc1fb6442644d7284a6d095f5bb9f0296840 (diff)
set the 'retry' bit to TRUE when the connection is about to be retried,
this allows the HTTP code to *not* return a failure just because no data has been received from the server
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index ac23b11c8..707895fde 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -29,7 +29,9 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
+#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
+#endif
#include <sys/stat.h>
#include <errno.h>
@@ -44,7 +46,9 @@
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
#include <sys/time.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -56,7 +60,9 @@
#ifdef HAVE_NET_IF_H
#include <net/if.h>
#endif
+#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
+#endif
#include <signal.h>
#ifdef HAVE_SYS_PARAM_H
@@ -1910,6 +1916,11 @@ CURLcode Curl_perform(struct SessionHandle *data)
newurl = 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! */
}
else
/*