Loading CHANGES +15 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,21 @@ History of Changes Daniel (16 April 2002) - Dirk Manske brought a patch that introduced two new CURLINFO_* values: CURLINFO_REDIRECT_TIME and CURLINFO_REDIRECT_COUNT. Daniel (15 April 2002) - Jonatan Lander patched the verbose text 'Disables POST, goes with GET' to reflect reality better, like when the first request isn't POST and when the second isn't GET... :-) - Craig Davison pointed out that when curl_formadd()ing a file that doesn't exist, libcurl doesn't return error. Now, curl_easy_perform() will return CURLE_READ_ERROR if that is the case. Test 41 was added to verify this. Version 7.9.6 Daniel (14 April 2002) - Dirk Manske brought a fix that makes libcurl strip off white spaces from the beginning of cookie contents. Loading include/curl/curl.h +4 −1 Original line number Diff line number Diff line Loading @@ -718,9 +718,12 @@ typedef enum { CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, /* Fill in new entries here! */ CURLINFO_LASTONE = 19 CURLINFO_LASTONE = 21 } CURLINFO; /* unfortunately, the easy.h and multi.h include files need options and info Loading lib/getinfo.c +7 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ CURLcode Curl_initinfo(struct SessionHandle *data) pro->t_pretransfer = 0; pro->t_starttransfer = 0; pro->timespent = 0; pro->t_redirect = 0; info->httpcode = 0; info->httpversion=0; Loading Loading @@ -148,6 +149,12 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...) case CURLINFO_CONTENT_LENGTH_UPLOAD: *param_doublep = data->progress.size_ul; break; case CURLINFO_REDIRECT_TIME: *param_doublep = data->progress.t_redirect; break; case CURLINFO_REDIRECT_COUNT: *param_longp = data->set.followlocation; break; case CURLINFO_CONTENT_TYPE: *param_charp = data->info.contenttype; break; Loading lib/progress.c +13 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,15 @@ void Curl_pgrsDone(struct connectdata *conn) } } /* reset all times except redirect */ void Curl_pgrsResetTimes(struct SessionHandle *data) { data->progress.t_nslookup = 0.0; data->progress.t_connect = 0.0; data->progress.t_pretransfer = 0.0; data->progress.t_starttransfer = 0.0; } void Curl_pgrsTime(struct SessionHandle *data, timerid timer) { switch(timer) { Loading Loading @@ -134,6 +143,10 @@ void Curl_pgrsTime(struct SessionHandle *data, timerid timer) case TIMER_POSTRANSFER: /* this is the normal end-of-transfer thing */ break; case TIMER_REDIRECT: data->progress.t_redirect = (double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000.0; break; } } Loading lib/progress.h +2 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ typedef enum { TIMER_STARTTRANSFER, TIMER_POSTRANSFER, TIMER_STARTSINGLE, TIMER_REDIRECT, TIMER_LAST /* must be last */ } timerid; Loading @@ -44,6 +45,7 @@ void Curl_pgrsSetUploadSize(struct SessionHandle *data, double size); void Curl_pgrsSetDownloadCounter(struct SessionHandle *data, double size); void Curl_pgrsSetUploadCounter(struct SessionHandle *data, double size); int Curl_pgrsUpdate(struct connectdata *); void Curl_pgrsResetTimes(struct SessionHandle *data); void Curl_pgrsTime(struct SessionHandle *data, timerid timer); Loading Loading
CHANGES +15 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,21 @@ History of Changes Daniel (16 April 2002) - Dirk Manske brought a patch that introduced two new CURLINFO_* values: CURLINFO_REDIRECT_TIME and CURLINFO_REDIRECT_COUNT. Daniel (15 April 2002) - Jonatan Lander patched the verbose text 'Disables POST, goes with GET' to reflect reality better, like when the first request isn't POST and when the second isn't GET... :-) - Craig Davison pointed out that when curl_formadd()ing a file that doesn't exist, libcurl doesn't return error. Now, curl_easy_perform() will return CURLE_READ_ERROR if that is the case. Test 41 was added to verify this. Version 7.9.6 Daniel (14 April 2002) - Dirk Manske brought a fix that makes libcurl strip off white spaces from the beginning of cookie contents. Loading
include/curl/curl.h +4 −1 Original line number Diff line number Diff line Loading @@ -718,9 +718,12 @@ typedef enum { CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, /* Fill in new entries here! */ CURLINFO_LASTONE = 19 CURLINFO_LASTONE = 21 } CURLINFO; /* unfortunately, the easy.h and multi.h include files need options and info Loading
lib/getinfo.c +7 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ CURLcode Curl_initinfo(struct SessionHandle *data) pro->t_pretransfer = 0; pro->t_starttransfer = 0; pro->timespent = 0; pro->t_redirect = 0; info->httpcode = 0; info->httpversion=0; Loading Loading @@ -148,6 +149,12 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...) case CURLINFO_CONTENT_LENGTH_UPLOAD: *param_doublep = data->progress.size_ul; break; case CURLINFO_REDIRECT_TIME: *param_doublep = data->progress.t_redirect; break; case CURLINFO_REDIRECT_COUNT: *param_longp = data->set.followlocation; break; case CURLINFO_CONTENT_TYPE: *param_charp = data->info.contenttype; break; Loading
lib/progress.c +13 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,15 @@ void Curl_pgrsDone(struct connectdata *conn) } } /* reset all times except redirect */ void Curl_pgrsResetTimes(struct SessionHandle *data) { data->progress.t_nslookup = 0.0; data->progress.t_connect = 0.0; data->progress.t_pretransfer = 0.0; data->progress.t_starttransfer = 0.0; } void Curl_pgrsTime(struct SessionHandle *data, timerid timer) { switch(timer) { Loading Loading @@ -134,6 +143,10 @@ void Curl_pgrsTime(struct SessionHandle *data, timerid timer) case TIMER_POSTRANSFER: /* this is the normal end-of-transfer thing */ break; case TIMER_REDIRECT: data->progress.t_redirect = (double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000.0; break; } } Loading
lib/progress.h +2 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ typedef enum { TIMER_STARTTRANSFER, TIMER_POSTRANSFER, TIMER_STARTSINGLE, TIMER_REDIRECT, TIMER_LAST /* must be last */ } timerid; Loading @@ -44,6 +45,7 @@ void Curl_pgrsSetUploadSize(struct SessionHandle *data, double size); void Curl_pgrsSetDownloadCounter(struct SessionHandle *data, double size); void Curl_pgrsSetUploadCounter(struct SessionHandle *data, double size); int Curl_pgrsUpdate(struct connectdata *); void Curl_pgrsResetTimes(struct SessionHandle *data); void Curl_pgrsTime(struct SessionHandle *data, timerid timer); Loading