mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
- Gabriel Kuri reported a problem with CURLINFO_CONTENT_LENGTH_DOWNLOAD if the
download was 0 bytes, as libcurl would then return the size as unknown (-1) and not 0. I wrote a fix and test case 566 to verify it.
This commit is contained in:
parent
d8884168e3
commit
223d848104
5
CHANGES
5
CHANGES
@ -6,6 +6,11 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Daniel Stenberg (31 Oct 2009)
|
||||||
|
- Gabriel Kuri reported a problem with CURLINFO_CONTENT_LENGTH_DOWNLOAD if the
|
||||||
|
download was 0 bytes, as libcurl would then return the size as unknown (-1)
|
||||||
|
and not 0. I wrote a fix and test case 566 to verify it.
|
||||||
|
|
||||||
Daniel Stenberg (30 Oct 2009)
|
Daniel Stenberg (30 Oct 2009)
|
||||||
- Liza Alenchery mentioned a problem with re-used SCP connection when a bad
|
- Liza Alenchery mentioned a problem with re-used SCP connection when a bad
|
||||||
auth is used, as it caused a crash. I failed to repeat the issue, but still
|
auth is used, as it caused a crash. I failed to repeat the issue, but still
|
||||||
|
@ -44,6 +44,7 @@ This release includes the following bugfixes:
|
|||||||
o unparsable cookie expire dates make cookies get treated as session coookies
|
o unparsable cookie expire dates make cookies get treated as session coookies
|
||||||
o POST with Digest authentication and "Transfer-Encoding: chunked"
|
o POST with Digest authentication and "Transfer-Encoding: chunked"
|
||||||
o SCP connection re-use with wrong auth
|
o SCP connection re-use with wrong auth
|
||||||
|
o CURLINFO_CONTENT_LENGTH_DOWNLOAD for 0 bytes transfers
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
@ -57,6 +58,6 @@ advice from friends like these:
|
|||||||
Claes Jakobsson, Sven Anders, Chris Mumford, John P. McCaskey,
|
Claes Jakobsson, Sven Anders, Chris Mumford, John P. McCaskey,
|
||||||
Constantine Sapuntzakis, Michael Stillwell, Tom Mueller, Dan Fandrich,
|
Constantine Sapuntzakis, Michael Stillwell, Tom Mueller, Dan Fandrich,
|
||||||
Kevin Baughman, John Dennis, Ray Dassen, Johan van Selst, Dima Barsky,
|
Kevin Baughman, John Dennis, Ray Dassen, Johan van Selst, Dima Barsky,
|
||||||
Liza Alenchery
|
Liza Alenchery, Gabriel Kuri
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@ -211,7 +211,7 @@ void Curl_pgrsSetUploadCounter(struct SessionHandle *data, curl_off_t size)
|
|||||||
void Curl_pgrsSetDownloadSize(struct SessionHandle *data, curl_off_t size)
|
void Curl_pgrsSetDownloadSize(struct SessionHandle *data, curl_off_t size)
|
||||||
{
|
{
|
||||||
data->progress.size_dl = size;
|
data->progress.size_dl = size;
|
||||||
if(size > 0)
|
if(size >= 0)
|
||||||
data->progress.flags |= PGRS_DL_SIZE_KNOWN;
|
data->progress.flags |= PGRS_DL_SIZE_KNOWN;
|
||||||
else
|
else
|
||||||
data->progress.flags &= ~PGRS_DL_SIZE_KNOWN;
|
data->progress.flags &= ~PGRS_DL_SIZE_KNOWN;
|
||||||
@ -220,7 +220,7 @@ void Curl_pgrsSetDownloadSize(struct SessionHandle *data, curl_off_t size)
|
|||||||
void Curl_pgrsSetUploadSize(struct SessionHandle *data, curl_off_t size)
|
void Curl_pgrsSetUploadSize(struct SessionHandle *data, curl_off_t size)
|
||||||
{
|
{
|
||||||
data->progress.size_ul = size;
|
data->progress.size_ul = size;
|
||||||
if(size > 0)
|
if(size >= 0)
|
||||||
data->progress.flags |= PGRS_UL_SIZE_KNOWN;
|
data->progress.flags |= PGRS_UL_SIZE_KNOWN;
|
||||||
else
|
else
|
||||||
data->progress.flags &= ~PGRS_UL_SIZE_KNOWN;
|
data->progress.flags &= ~PGRS_UL_SIZE_KNOWN;
|
||||||
|
@ -17,7 +17,7 @@ int test(char *URL)
|
|||||||
CURLcode res;
|
CURLcode res;
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
|
|
||||||
long content_length;
|
double content_length = 3;
|
||||||
|
|
||||||
if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
|
if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
|
||||||
fprintf(stderr, "curl_global_init() failed\n");
|
fprintf(stderr, "curl_global_init() failed\n");
|
||||||
@ -41,7 +41,7 @@ int test(char *URL)
|
|||||||
&content_length);
|
&content_length);
|
||||||
moo = fopen(libtest_arg2, "wb");
|
moo = fopen(libtest_arg2, "wb");
|
||||||
if(moo) {
|
if(moo) {
|
||||||
fprintf(moo, "CL: %ld\n", content_length);
|
fprintf(moo, "CL: %.0f\n", content_length);
|
||||||
fclose(moo);
|
fclose(moo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user