Issue - necessary data rewind wasn't possible
Hello, I am getting following error very frequently: Curl logs: === -connection died retrying a fresh connect -necessary data rewind wasn't possible === Sometimes it gets success in retry but sometimes it fails with necessary data rewind wasn't possible. Can anyone explain reason for this and how to handle it? One of the observation is that I am getting this error with SSL(https). Without SSL it is working fine. Information for your assistance: Platform - SuSE 64 bit libcurl version - 7.33 Interface - libcurl multi interface Kindly let me know if you need anything else from my side. -- Thanks and Regards, Sachin Dravid --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: [Bulk] I want to delete file from sftp bu libcurl, but...
?? 506017...@qq.com wrote: headerlist = curl_slist_append(headerlist, rm abc.c); result = curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist); Maybe the command should be dele abc.c under this SFTP-server. --gv --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: I want to delete file from sftp bu libcurl, but...
On Wed, Dec 11, 2013 at 12:27:43PM +0100, Gisle Vanem wrote: 刘英伟 506017...@qq.com wrote: headerlist = curl_slist_append(headerlist, rm abc.c); result = curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist); Maybe the command should be dele abc.c under this SFTP-server. No, the sftp commands are interpreted by libcurl itself and transformed into the binary sftp protocol form, so it's always rm. My guess would be that the path is incorrect (the default isn't where the file is), or a permissions problem. Dan --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: Issue - necessary data rewind wasn't possible
On Wed, 11 Dec 2013, sachin dravid wrote: Curl logs: === -connection died retrying a fresh connect -necessary data rewind wasn't possible === Sometimes it gets success in retry but sometimes it fails with necessary data rewind wasn't possible. Can anyone explain reason for this and how to handle it? Use CURLOPT_SEEKFUNCTION to set a callback that allows seeking back in the stream to allow libcurl to resend data. http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTSEEKFUNCTION One of the observation is that I am getting this error with SSL(https). Without SSL it is working fine. At times libcurl needs to resend data it already sent in a POST/PUT request, and if it can't rewind that data on its own you need to provide a way for it to do it. -- / daniel.haxx.se --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: libcurl's behaviour when CURLOPT_MAX_RECV_SPEED_LARGE is used
On Tue, Dec 10, 2013 at 10:58:39PM +0100, Daniel Stenberg wrote: On Wed, 11 Dec 2013, Mohammad_AlSaleh wrote: CURLOPT_MAX_RECV_SPEED_LARGE on a file:// URL is not supported, and not a good idea. Although it also shouldn't harm anything. It doesn't make sense anyway. I just used it to exaggerate the effects of the behaviour I'm trying to describe. But are you saying you also see this same effect with other protocols? That's what I thought. But I can't reproduce with http now. So, I was probably wrong. -- / daniel.haxx.se --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: [PATCH]
On Tue, 10 Dec 2013, Eric Lubin wrote: Oh, lovely fix. Thanks! Merged and pushed. -- / daniel.haxx.se --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: libcurl's behaviour when CURLOPT_MAX_RECV_SPEED_LARGE is used
On Wed, 11 Dec 2013, Mohammad_AlSaleh wrote: But are you saying you also see this same effect with other protocols? That's what I thought. But I can't reproduce with http now. So, I was probably wrong. OK, thanks. I can repeat it fine with your example on a FILE:// URL, and I've figured out exactly why it happens. I have an idea for a rather clean fix as well... -- / daniel.haxx.se --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
looking for libcurl for armhf Ubuntu13.04
Hello I am looking for libcurl in order to cross compile (under Ubuntu12.10) an application running at Beaglebone-Black Ubuntu13.04 . could some assist me : 1) choosing the right libcurl version, which I may install in Ubuntu12.10-Desktop 2) I'm afraid of lib conflicts between the libcurl installed in Ubuntu (which I use to debug the app) may I install in parallel with the one already installed in Ubuntu12.10 3) and Eclipse compile settings in any help please ? (I hope this is the right place to post such a request, apologize if not) regards Haggai --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
I have a question about the wildcard on the sftp server.
I have a question about the wildcard on the sftp server. I want to list the directory and get information of files , but the path contains wildcard (example sftp://admin:admin@132.40.130.35:22/ogsapp/tmp/hebh/sftptest/* ) Maybe the sftp can't support it , How can I solve this problem?--- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: Issue - necessary data rewind wasn't possible
Thanks for the help!! I have one more question on this. In this situation I am getting CURLE_OK. Because the connection has broken, I don't have HTTP code as well. I can make a retry on this particular case from my application, but if I get CURLE_OK how does my application recognize it? Could you please tell me how can my application recognize for retry in this case? Also, if possible kindly send me some reference example of CURLOPT_SEEKFUNCTION, as I am not able to find it on WWW. Thanks, Sachin On Wed, Dec 11, 2013 at 8:35 PM, Daniel Stenberg dan...@haxx.se wrote: On Wed, 11 Dec 2013, sachin dravid wrote: Curl logs: === -connection died retrying a fresh connect -necessary data rewind wasn't possible === Sometimes it gets success in retry but sometimes it fails with necessary data rewind wasn't possible. Can anyone explain reason for this and how to handle it? Use CURLOPT_SEEKFUNCTION to set a callback that allows seeking back in the stream to allow libcurl to resend data. http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTSEEKFUNCTION One of the observation is that I am getting this error with SSL(https). Without SSL it is working fine. At times libcurl needs to resend data it already sent in a POST/PUT request, and if it can't rewind that data on its own you need to provide a way for it to do it. -- / daniel.haxx.se --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html -- Thanks and Regards, Sachin Dravid --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
[PATCH]
From 9c9cff156a8b1208edad400058192e9a0d35 Mon Sep 17 00:00:00 2001 From: Eric Lubin e...@lubin.us Date: Tue, 10 Dec 2013 20:01:07 -0800 Subject: [PATCH] lib/parsedate: Fixed an overflow check optimized out because of undefined behavior In C, signed integer overflow is undefined behavior. Thus, the compiler is allowed to assume that it will not occur. In the check for an overflow, the developer assumes that the signed integer of type time_t will wrap around if it overflows. However, this behavior is undefined in the C standard. Thus, when the compiler sees this, it simplifies t + delta t to delta 0. Since delta 0 and delta 0 can't both be true, the entire if statement is optimized out under certain optimization levels. Thus, the parsedate function would return PARSEDATE_OK with an undefined value in the time, instead of return -1 = PARSEDATE_FAIL. --- lib/parsedate.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parsedate.c b/lib/parsedate.c index 1ddd008..b32be8f 100644 --- a/lib/parsedate.c +++ b/lib/parsedate.c @@ -526,7 +526,7 @@ static int parsedate(const char *date, time_t *output) /* Add the time zone diff between local time zone and GMT. */ long delta = (long)(tzoff!=-1?tzoff:0); -if((delta0) (t + delta t)) +if((delta0) t LONG_MAX - delta) return -1; /* time_t overflow */ t += delta; -- 1.7.9.5 --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
RE: Issue - necessary data rewind wasn't possible
I have one more question on this. In this situation I am getting CURLE_OK. Because the connection has broken, I don't have HTTP code as well. I can make a retry on this particular case from my application, but if I get CURLE_OK how does my application recognize it? Could you please tell me how can my application recognize for retry in this case? You should use CURLOPT_IOCTLFUNCTION and you will be called with CURLIOCMD_RESTARTREAD. HTH Yehezkel Horowitz --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html