aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-01-26 15:50:56 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-01-26 15:50:56 +0000
commitc331ef02f9f2284c49826ac1485e8d1b1bd890f1 (patch)
treecc7a90c24182b2b69ad7cdb8dae7edc422c5f507
parent3a3f632bf0e1d65a2bd5ab4ff47c6bd7f5e0e474 (diff)
The check for that content-range is received must only be made if we requested
GET resume. Other resumes are upload-wise and don't care about this header in the download stream
-rw-r--r--lib/transfer.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index a2d443376..c6504059c 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -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) {