mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
- Test case 1041 (added by Daniel Fandrich April 14th) proved a bug where PUT
with -C - sent garbage in the Content-Range: header. I fixed this problem by making sure libcurl always sets the size of the _entire_ upload if an app attemps to do resumed uploads since libcurl simply cannot know the size of what is currently at the server end. Test 1041 is no longer disabled.
This commit is contained in:
parent
d6344d9b5f
commit
8d012181b0
8
CHANGES
8
CHANGES
@ -6,6 +6,14 @@
|
||||
|
||||
Changelog
|
||||
|
||||
|
||||
Daniel Stenberg (4 Aug 2008)
|
||||
- Test case 1041 (added by Daniel Fandrich April 14th) proved a bug where PUT
|
||||
with -C - sent garbage in the Content-Range: header. I fixed this problem by
|
||||
making sure libcurl always sets the size of the _entire_ upload if an app
|
||||
attemps to do resumed uploads since libcurl simply cannot know the size of
|
||||
what is currently at the server end. Test 1041 is no longer disabled.
|
||||
|
||||
Yang Tse (2 Aug 2008)
|
||||
- No longer test availability of the gdi32 library, nor use it for linking, even
|
||||
when we have been doing this since revision 1.47 of configure.ac 4 years and
|
||||
|
@ -45,6 +45,7 @@ This release includes the following bugfixes:
|
||||
o a user name in a proxy URL without a password was parsed incorrectly
|
||||
o library will now be built with _REENTRANT symbol defined only if needed
|
||||
o no longer link with gdi32 on Windows cross-compiled targets
|
||||
o PUT with -C - sent bad Content-Range: header
|
||||
|
||||
This release includes the following known bugs:
|
||||
|
||||
|
@ -25,8 +25,6 @@ To be addressed before 7.19.0 (planned release: August 2008)
|
||||
tests on the system might allow determination of the problem origin.
|
||||
Solaris AutoBuilds suceeded on August 2 and 3.
|
||||
|
||||
150 - PUT with -C - sends garbage in the Content-Range: header (test case 1041)
|
||||
|
||||
151 - PUT with -L hangs after receiving a redirect (test case 1051, but the
|
||||
test harness has a problem with this, too)
|
||||
|
||||
|
12
lib/http.c
12
lib/http.c
@ -2363,7 +2363,17 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
||||
if(conn->allocptr.rangeline)
|
||||
free(conn->allocptr.rangeline);
|
||||
|
||||
if(data->state.resume_from) {
|
||||
if(data->set.set_resume_from < 0) {
|
||||
/* Upload resume was asked for, but we don't know the size of the
|
||||
remote part so we tell the server (and act accordingly) that we
|
||||
upload the whole file (again) */
|
||||
conn->allocptr.rangeline =
|
||||
aprintf("Content-Range: bytes 0-%" FORMAT_OFF_T
|
||||
"/%" FORMAT_OFF_T "\r\n",
|
||||
data->set.infilesize - 1, data->set.infilesize);
|
||||
|
||||
}
|
||||
else if(data->state.resume_from) {
|
||||
/* This is because "resume" was selected */
|
||||
curl_off_t total_expected_size=
|
||||
data->state.resume_from + data->set.infilesize;
|
||||
|
@ -3,7 +3,6 @@
|
||||
# test cases are run by runtests.pl. Just add the plain test case numbers, one
|
||||
# per line.
|
||||
# Lines starting with '#' letters are treated as comments.
|
||||
1041
|
||||
1051
|
||||
1052
|
||||
1055
|
||||
|
Loading…
Reference in New Issue
Block a user