]> granicus.if.org Git - curl/commitdiff
The check for that content-range is received must only be made if we requested
authorDaniel Stenberg <daniel@haxx.se>
Fri, 26 Jan 2001 15:50:56 +0000 (15:50 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 26 Jan 2001 15:50:56 +0000 (15:50 +0000)
GET resume. Other resumes are upload-wise and don't care about this header
in the download stream

lib/transfer.c

index a2d443376e6a9c589fab92539f63e983c58aa78c..c6504059cc8af81c6e2291599dcec8b1b7ab095f 100644 (file)
@@ -444,10 +444,14 @@ _Transfer(struct connectdata *c_conn)
                  write a chunk of the body */
               if(conn->protocol&PROT_HTTP) {
                 /* HTTP-only checks */
-                if (data->resume_from && !content_range ) {
+                if (data->resume_from &&
+                    !content_range &&
+                    (data->httpreq==HTTPREQ_GET)) {
                   /* we wanted to resume a download, although the server
-                     doesn't seem to support this */
-                  failf (data, "HTTP server doesn't seem to support byte ranges. Cannot resume.");
+                     doesn't seem to support this and we did this with a GET
+                     (if it wasn't a GET we did a POST or PUT resume) */
+                  failf (data, "HTTP server doesn't seem to support "
+                         "byte ranges. Cannot resume.");
                   return CURLE_HTTP_RANGE_ERROR;
                 }
                 else if (data->newurl) {