mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
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
This commit is contained in:
parent
3a3f632bf0
commit
c331ef02f9
@ -444,10 +444,14 @@ _Transfer(struct connectdata *c_conn)
|
|||||||
write a chunk of the body */
|
write a chunk of the body */
|
||||||
if(conn->protocol&PROT_HTTP) {
|
if(conn->protocol&PROT_HTTP) {
|
||||||
/* HTTP-only checks */
|
/* 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
|
/* we wanted to resume a download, although the server
|
||||||
doesn't seem to support this */
|
doesn't seem to support this and we did this with a GET
|
||||||
failf (data, "HTTP server doesn't seem to support byte ranges. Cannot resume.");
|
(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;
|
return CURLE_HTTP_RANGE_ERROR;
|
||||||
}
|
}
|
||||||
else if (data->newurl) {
|
else if (data->newurl) {
|
||||||
|
Loading…
Reference in New Issue
Block a user