Discussion:
Transferred a partial file
leela siva
2014-01-21 08:15:48 UTC
Permalink
HI,



I am using libcurl library for my application.

Some times I am getting following error for push operation.



Can you please help me why it is giving this error ?



curl_easy_perform failed...

curl_easy_perform failed with error message = Transferred a partial file





Thanks and regards

Koka
Daniel Stenberg
2014-01-21 08:23:51 UTC
Permalink
Post by leela siva
curl_easy_perform failed with error message = Transferred a partial file
The man page libcurl-errors says this:

CURLE_PARTIAL_FILE (18)

A file transfer was shorter or larger than expected. This happens when the
server first reports an expected transfer size, and then delivers data that
doesn't match the previously given size.
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
leela siva
2014-01-21 08:34:26 UTC
Permalink
HI ,

Thanks for information

i am using this line in my code .Is there any problem with this
.
stat(localFile.c_str(), &file_info)
curl_off_t fsize = (curl_off_t)file_info.st_size;
curl_easy_setopt(m_curl_handle, CURLOPT_INFILESIZE_LARGE,
(curl_off_t)fsize);

Thanks and reagrds
Koka
Post by leela siva
curl_easy_perform failed with error message = Transferred a partial file
CURLE_PARTIAL_FILE (18)
A file transfer was shorter or larger than expected. This happens when the
server first reports an expected transfer size, and then delivers data that
doesn't match the previously given size.
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg
2014-01-21 08:58:18 UTC
Permalink
Post by leela siva
i am using this line in my code .Is there any problem with this
.
stat(localFile.c_str(), &file_info)
curl_off_t fsize = (curl_off_t)file_info.st_size;
curl_easy_setopt(m_curl_handle, CURLOPT_INFILESIZE_LARGE,
(curl_off_t)fsize);
First, please don't top-post:
http://curl.haxx.se/mail/etiquette.html#Do_Not_Top_Post

That piece of the code is not a problem. The error code is for what you
receive or don't receive.

Also, you didn't tell us which libcurl verison or what platform or what
protocol your using. You leave us guessing quite a lot and that will lead to
less good advice and answers.
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
leela siva
2014-01-21 09:27:13 UTC
Permalink
HI,

libcurl version -
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7
NSS/3.14.3.0zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

OS is

Linux 2.6.32-358.17.1.el6.x86_64 #1 SMP Tue Jul 23 18:04:58 EDT 2013 x86_64
x86_64 x86_64 GNU/Linux

protocol using is - FTP

please help me regarding this.

i am getting same partial file transfer error.


Thanks and reagrds
Koka
Post by leela siva
i am using this line in my code .Is there any problem with this
Post by leela siva
.
stat(localFile.c_str(), &file_info)
curl_off_t fsize = (curl_off_t)file_info.st_size;
curl_easy_setopt(m_curl_handle, CURLOPT_INFILESIZE_LARGE,
(curl_off_t)fsize);
First, please don't top-post: http://curl.haxx.se/mail/
etiquette.html#Do_Not_Top_Post
That piece of the code is not a problem. The error code is for what you
receive or don't receive.
Also, you didn't tell us which libcurl verison or what platform or what
protocol your using. You leave us guessing quite a lot and that will lead
to less good advice and answers.
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Dan Fandrich
2014-01-21 20:20:45 UTC
Permalink
This post might be inappropriate. Click to display it.
leela siva
2014-01-29 09:33:00 UTC
Permalink
HI ,


I verified in wireshark trace it is showing connction reset by peer .

can you help me why curl interface is receiving this error from server.

Thanks and regards
Koka
Post by leela siva
Post by leela siva
libcurl version -
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0zlib/1.2.3
libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
OS is
Linux 2.6.32-358.17.1.el6.x86_64 #1 SMP Tue Jul 23 18:04:58 EDT 2013
x86_64
Post by leela siva
x86_64 x86_64 GNU/Linux
protocol using is - FTP
please help me regarding this.
i am getting same partial file transfer error.
Does the transfer take a long time to complete? Some people have had
problems with firewalls timing out ftp control connections during long
transfers. I'm not positive that would end up with this error code, though.
Post by leela siva
Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Dan Fandrich
2014-01-29 20:03:09 UTC
Permalink
Post by leela siva
I verified in wireshark trace it is showing connction reset by peer .
can you help me why curl interface is receiving this error from server.
Probably because the peer reset the connection. And if it's the server doing
it, you'll have to look on the server side for answers. It could also be due
to a firewall somewhere. You haven't given many details.
Post by leela siva
Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Loading...