Index: lib/transfer.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/transfer.c,v
retrieving revision 1.272
diff -u -r1.272 transfer.c
--- lib/transfer.c	7 Apr 2005 15:27:14 -0000	1.272
+++ lib/transfer.c	8 Apr 2005 14:14:52 -0000
@@ -697,6 +697,7 @@
                    * fields.  */
                   conn->size=0;
                   conn->maxdownload=0;
+                  k->ignorecl = TRUE; /* ignore Content-Length headers */
                   break;
                 default:
                   /* nothing */
@@ -713,7 +714,7 @@
                the header completely if we get a 416 response as then we're
                resuming a document that we don't get, and this header contains
                info about the true size of the document we didn't get now. */
-            if ((k->httpcode != 416) &&
+            if (!k->ignorecl &&
                 checkprefix("Content-Length:", k->p)) {
               contentlength = curlx_strtoofft(k->p+15, NULL, 10);
               if (data->set.max_filesize &&
Index: lib/urldata.h
===================================================================
RCS file: /cvsroot/curl/curl/lib/urldata.h,v
retrieving revision 1.265
diff -u -r1.265 urldata.h
--- lib/urldata.h	7 Apr 2005 15:27:14 -0000	1.265
+++ lib/urldata.h	8 Apr 2005 14:14:52 -0000
@@ -494,6 +494,8 @@
                        and we're uploading the last chunk */
 
   bool ignorebody;  /* we read a response-body but we ignore it! */
+  bool ignorecl;    /* This HTTP response has no body so we ignore the Content-
+                       Length: header */
 };
 
 #if defined(USE_ARES) || defined(USE_THREADING_GETHOSTBYNAME) || \
