Changelog
+Daniel Stenberg (23 Feb 2009)
+- After a bug reported by James Cheng I've made curl_easy_getinfo() for
+ CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_CONTENT_LENGTH_UPLOAD return
+ -1 if the sizes aren't know. Previously these returned 0, make it impossible
+ to detect the difference between actually zero and unknown.
+
Yang Tse (23 Feb 2009)
- Daniel Johnson provided a shell script that will perform all the steps needed
to build a Mac OS X fat ppc/i386 or ppc64/x86_64 libcurl.framework
easily on transfer failures
o compilation halting when using VS2008 to build a Windows 2000 target
o ease creation of libcurl Mac OS X Framework
+ o CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_CONTENT_LENGTH_UPLOAD are -1
+ if unknown
This release includes the following known bugs:
Peter Sylvester, Chad Monroe, Markus Moeller, Yang Tse, Scott Cantor,
Patrick Scott, Hidemoto Nakada, Jocelyn Jaubert, Andre Guibert de Bruet,
Kamil Dudka, Patrik Thunstrom, Linus Nielsen Feltzing, Mark Incley,
- Daniel Johnson
+ Daniel Johnson, James Cheng
Thanks! (and sorry if I forgot to mention someone)
218 - Senthil Raja Velu's "CURLOPT_LOCALPORT option broken", patch by
Markus Koetter
-219 - James Cheng's bug "How to detect missing Content-Length response header?"
-
-
To be addressed in 7.19.5 (planned release: May 2009)
=========================
data for you. (Added in 7.12.3)
.IP CURLINFO_CONTENT_LENGTH_DOWNLOAD
Pass a pointer to a double to receive the content-length of the download. This
-is the value read from the Content-Length: field.
+is the value read from the Content-Length: field. Since 7.19.4, this returns -1
+if the size isn't known.
.IP CURLINFO_CONTENT_LENGTH_UPLOAD
-Pass a pointer to a double to receive the specified size of the upload.
+Pass a pointer to a double to receive the specified size of the upload. Since
+7.19.4, this returns -1 if the size isn't known.
.IP CURLINFO_CONTENT_TYPE
Pass a pointer to a 'char *' to receive the content-type of the downloaded
object. This is the value read from the Content-Type: field. If you get NULL,
#include "memory.h"
#include "sslgen.h"
#include "connect.h" /* Curl_getconnectinfo() */
+#include "progress.h"
/* Make this the last #include */
#include "memdebug.h"
*param_longp = data->set.ssl.certverifyresult;
break;
case CURLINFO_CONTENT_LENGTH_DOWNLOAD:
- *param_doublep = (double)data->progress.size_dl;
+ *param_doublep = (data->progress.flags & PGRS_DL_SIZE_KNOWN)?
+ (double)data->progress.size_dl:-1;
break;
case CURLINFO_CONTENT_LENGTH_UPLOAD:
- *param_doublep = (double)data->progress.size_ul;
+ *param_doublep = (data->progress.flags & PGRS_UL_SIZE_KNOWN)?
+ (double)data->progress.size_ul:-1;
break;
case CURLINFO_REDIRECT_TIME:
*param_doublep = data->progress.t_redirect;