Chih-Chung Chang reported that if you use CURLOPT_RESUME_FROM and enabled
CURLOPT_FOLLOWLOCATION, libcurl reported error if a redirect happened even if the new URL would provide the resumed file. Test case 188 added to verify the fix (together with existing test 99).
This commit is contained in:
5
CHANGES
5
CHANGES
@@ -7,6 +7,11 @@
|
|||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
Daniel (6 October 2004)
|
Daniel (6 October 2004)
|
||||||
|
- Chih-Chung Chang reported that if you use CURLOPT_RESUME_FROM and enabled
|
||||||
|
CURLOPT_FOLLOWLOCATION, libcurl reported error if a redirect happened even
|
||||||
|
if the new URL would provide the resumed file. Test case 188 added to verify
|
||||||
|
the fix (together with existing test 99).
|
||||||
|
|
||||||
- Dan Fandrich fixed a configure flaw for systems that need both nsl and socket
|
- Dan Fandrich fixed a configure flaw for systems that need both nsl and socket
|
||||||
libs to use gethostbyname().
|
libs to use gethostbyname().
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ This release includes the following changes:
|
|||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
|
o HTTP resume was refused if redirected
|
||||||
o configure's gethostbyname check when both nsl and socket libs are required
|
o configure's gethostbyname check when both nsl and socket libs are required
|
||||||
o configure --with-libidn now checks the given path before defaults
|
o configure --with-libidn now checks the given path before defaults
|
||||||
o a race condition sometimes resulting in CURLE_COULDNT_RESOLVE_HOST in the
|
o a race condition sometimes resulting in CURLE_COULDNT_RESOLVE_HOST in the
|
||||||
@@ -63,6 +64,6 @@ advice from friends like these:
|
|||||||
Tarendash, Daniel at touchtunes, Bertrand Demiddelaer, Andreas Rieke,
|
Tarendash, Daniel at touchtunes, Bertrand Demiddelaer, Andreas Rieke,
|
||||||
Jean-Claude Chauve, Dan Fandrich, Peter Sylvester, "Mekonikum", Jean-Philippe
|
Jean-Claude Chauve, Dan Fandrich, Peter Sylvester, "Mekonikum", Jean-Philippe
|
||||||
Barrette-LaPierre, G<>nter Knauf, Larry Campbell, Fedor Karpelevitch,
|
Barrette-LaPierre, G<>nter Knauf, Larry Campbell, Fedor Karpelevitch,
|
||||||
Aleksandar Milivojevic, Gisle Vanem, Chris "Bob Bob"
|
Aleksandar Milivojevic, Gisle Vanem, Chris "Bob Bob", Chih-Chung Chang
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
|||||||
@@ -488,20 +488,12 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||||||
|
|
||||||
if (conn->resume_from &&
|
if (conn->resume_from &&
|
||||||
!k->content_range &&
|
!k->content_range &&
|
||||||
(data->set.httpreq==HTTPREQ_GET)) {
|
(data->set.httpreq==HTTPREQ_GET) &&
|
||||||
if(k->httpcode == 416) {
|
(k->httpcode == 416)) {
|
||||||
/* "Requested Range Not Satisfiable" */
|
/* "Requested Range Not Satisfiable" */
|
||||||
stop_reading = TRUE;
|
stop_reading = TRUE;
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* we wanted to resume a download, although the server
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CURL_DISABLE_HTTP
|
#ifndef CURL_DISABLE_HTTP
|
||||||
if(!stop_reading) {
|
if(!stop_reading) {
|
||||||
/* Curl_http_auth_act() checks what authentication methods
|
/* Curl_http_auth_act() checks what authentication methods
|
||||||
@@ -956,6 +948,17 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||||||
k->ignorebody = TRUE;
|
k->ignorebody = TRUE;
|
||||||
infof(data, "Ignoring the response-body\n");
|
infof(data, "Ignoring the response-body\n");
|
||||||
}
|
}
|
||||||
|
if (conn->resume_from && !k->content_range &&
|
||||||
|
(data->set.httpreq==HTTPREQ_GET) &&
|
||||||
|
!k->ignorebody) {
|
||||||
|
/* we wanted to resume a download, although the server 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;
|
||||||
|
}
|
||||||
|
|
||||||
if(data->set.timecondition && !conn->range) {
|
if(data->set.timecondition && !conn->range) {
|
||||||
/* A time condition has been set AND no ranges have been
|
/* A time condition has been set AND no ranges have been
|
||||||
requested. This seems to be what chapter 13.3.4 of
|
requested. This seems to be what chapter 13.3.4 of
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
|
|||||||
test512 test165 test166 test167 test168 test169 test170 test171 \
|
test512 test165 test166 test167 test168 test169 test170 test171 \
|
||||||
test172 test204 test205 test173 test174 test175 test176 test177 \
|
test172 test204 test205 test173 test174 test175 test176 test177 \
|
||||||
test513 test514 test178 test179 test180 test181 test182 test183 \
|
test513 test514 test178 test179 test180 test181 test182 test183 \
|
||||||
test184 test185 test186 test187
|
test184 test185 test186 test187 test188
|
||||||
|
|
||||||
# The following tests have been removed from the dist since they no longer
|
# The following tests have been removed from the dist since they no longer
|
||||||
# work. We need to fix the test suite's FTPS server first, then bring them
|
# work. We need to fix the test suite's FTPS server first, then bring them
|
||||||
|
|||||||
@@ -8,7 +8,17 @@ Connection: close
|
|||||||
Content-Length: 13
|
Content-Length: 13
|
||||||
Funny-head: yesyes
|
Funny-head: yesyes
|
||||||
|
|
||||||
|
0123456789123
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
|
<datacheck>
|
||||||
|
HTTP/1.1 404 Nah
|
||||||
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||||
|
Connection: close
|
||||||
|
Content-Length: 13
|
||||||
|
Funny-head: yesyes
|
||||||
|
|
||||||
|
</datacheck>
|
||||||
</reply>
|
</reply>
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user