cURL / Mailing Lists / curl-library / Single Mail

curl-library

failed to download binary file of actual size from source to destiantion

From: ankit singh <ankit.singh.sengar19_at_gmail.com>
Date: Thu, 19 May 2016 15:28:47 +0530

 Hi Daniel,

 Libcurl version that I am using is "7.30.0" .
 Add to this could you point me how to use in c code :

 curl -o output-file http://ip-address/input-file

 Will it be able to download the file of actual size ?
 Does this script requires libcurl installed on remote location ?

 Please let me know .

Regards,
--Ankit

On Thu, May 19, 2016 at 4:11 AM, <curl-library-request_at_cool.haxx.se> wrote:

> Send curl-library mailing list submissions to
> curl-library_at_cool.haxx.se
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-library
> or, via email, send a message with subject or body 'help' to
> curl-library-request_at_cool.haxx.se
>
> You can reach the person managing the list at
> curl-library-owner_at_cool.haxx.se
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of curl-library digest..."
>
>
> Today's Topics:
>
> 1. Re: curl_multi_info_read() API info (smruti kumari)
> 2. Re: curl_multi_info_read() API info (Daniel Stenberg)
> 3. Re: How to separate two different response (Daniel Stenberg)
> 4. Re: failed to download binary file of actual size from source
> to destiantion (Daniel Stenberg)
> 5. Re: ALPN in ClientHello for protocols other than HTTP?
> (TJ Saunders)
> 6. Aw: Re: (Secure) Websockets using libcurl (Patrick Rathje)
> 7. Re: ALPN in ClientHello for protocols other than HTTP?
> (moparisthebest)
> 8. Re: How to separate two different response (Ray Satiro)
> 9. Re: [RELEASE] curl and libcurl 7.49.0 (Jan Ehrhardt)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 18 May 2016 17:08:30 +0530
> From: smruti kumari <smrutikumari777_at_gmail.com>
> To: libcurl development <curl-library_at_cool.haxx.se>
> Subject: Re: curl_multi_info_read() API info
> Message-ID:
> <
> CAHkHnfQU1PgMjkdsAqWtZ4FfTzVBe3LxM4kydwDT-L0425bLjQ_at_mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Daniel,
>
> Is there any way to get the individual(send or recv) status of a easy
> handle ?
>
> Thanks
> Smruti
>
> On Wed, May 18, 2016 at 3:21 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> > On Wed, 18 May 2016, smruti kumari wrote:
> >
> > When we are calling curl_multi_info_read() API, we are getting the
> >> information regarding transfer of data. This transfer means
> >> 1. Sending of data completed by curl?
> >> OR
> >> 2. Receiving of data completed by curl?
> >>
> >
> > The only message you can get from this function (for now) is
> CURLMSG_DONE,
> > which means that the entire transfer is complete (it has sent and
> received
> > the data it was told to transfer or it failed doing so). You can then
> read
> > the 'CURLcode result' field to learn the return code for that individual
> > transfer that completed.
> >
> > --
> >
> > / daniel.haxx.se
> > -------------------------------------------------------------------
> > List admin: https://cool.haxx.se/list/listinfo/curl-library
> > Etiquette: https://curl.haxx.se/mail/etiquette.html
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://cool.haxx.se/pipermail/curl-library/attachments/20160518/5f33891f/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Wed, 18 May 2016 13:50:40 +0200 (CEST)
> From: Daniel Stenberg <daniel_at_haxx.se>
> To: libcurl development <curl-library_at_cool.haxx.se>
> Subject: Re: curl_multi_info_read() API info
> Message-ID: <alpine.DEB.2.20.1605181343270.8323_at_tvnag.unkk.fr>
> Content-Type: text/plain; format=flowed; charset=US-ASCII
>
> On Wed, 18 May 2016, smruti kumari wrote:
>
> PLEASE PLEASE PLEASE stop the top-posting.
>
> It is described here:
> https://curl.haxx.se/mail/etiquette.html#Do_Not_Top_Post
>
> > Is there any way to get the individual(send or recv) status of a easy
> handle
> > ?
>
> No. And by "status" I figure you mean return code? As you know the
> "status" is
> always successful until libcurl returns failure for the transfer...
>
> --
>
> / daniel.haxx.se
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 18 May 2016 14:32:37 +0200 (CEST)
> From: Daniel Stenberg <daniel_at_haxx.se>
> To: libcurl development <curl-library_at_cool.haxx.se>
> Subject: Re: How to separate two different response
> Message-ID: <alpine.DEB.2.20.1605181430470.8323_at_tvnag.unkk.fr>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> On Wed, 18 May 2016, smruti kumari wrote:
>
> > Let's consider I have two enpoints E1, E2 and one server. E1 send a
> request
> > to server and server forward to E2. E2 gives two responses to E1 via
> > server.If these two response come together(one after another) then how
> can I
> > separte it these two response since it's a stream?
>
> You have two transfers. E1 and E2. Then send and receive data. When the
> write
> callback is invoked by libcurl, they get the pointer set with
> CURLOPT_WRITEDATA passed to it as well. You can use that to pass in
> whatever
> data you want to help your function figure out which transfer the data
> belongs
> to.
>
> --
>
> / daniel.haxx.se
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 18 May 2016 15:08:05 +0200 (CEST)
> From: Daniel Stenberg <daniel_at_haxx.se>
> To: libcurl development <curl-library_at_cool.haxx.se>
> Subject: Re: failed to download binary file of actual size from source
> to destiantion
> Message-ID: <alpine.DEB.2.20.1605181506360.8323_at_tvnag.unkk.fr>
> Content-Type: text/plain; format=flowed; charset=US-ASCII
>
> On Wed, 18 May 2016, ankit singh wrote:
>
> > I tried to download binary file from remote location but the md5 / size
> of
> > downloaded file didn't match with file at remote location.
>
> ...
>
> > Please let me know if I am doing wrong here or is there any other APIs or
> > curl-option needs to be added.
>
> I spot nothing wrong.
>
> Does the same problem happen the same way every time on repeated tries? I
> presume this works fine if you use another ftp client to download the file?
>
> What libcurl version on what platform are you using?
>
> --
>
> / daniel.haxx.se
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 18 May 2016 09:20:38 -0700
> From: TJ Saunders <tj_at_castaglia.org>
> To: Daniel Stenberg <daniel_at_haxx.se>, libcurl development
> <curl-library_at_cool.haxx.se>
> Subject: Re: ALPN in ClientHello for protocols other than HTTP?
> Message-ID:
> <1463588438.3616514.611666945.744C1E82_at_webmail.messagingengine.com
> >
> Content-Type: text/plain
>
>
> > > It is now; I've requested of IANA that "ftp" be registered as one of
> the
> > > accepted ALPN extension names; see:
> >
> > Ah, neat. Our code is too hardcoded for the HTTP variations for ALPN
> still
> > though so in our case holding off ALPN for ftp makes sense. And I guess
> > ftp is there more for completeness rather than ftp servers actually
> offering
> > multiple protocols behind TLS.
>
> Technically it'd be possible to offer SFTP over TLS (rather than over
> SSH); an FTP server might also offer rsync over TLS. But those, I
> think, would be quite rare.
>
> I added support for "ftp" as an NPN/ALPN to ProFTPD's mod_tls module
> strictly to enable Chrome's TLS False Start when making TLS connections
> (and hopefully make for less latent FTP data transfers), per:
>
> https://www.imperialviolet.org/2012/04/11/falsestart.html
>
> Cheers,
> TJ
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 18 May 2016 18:27:04 +0200
> From: "Patrick Rathje" <PatrickRathje_at_web.de>
> To: curl-library_at_cool.haxx.se
> Cc: curl-library_at_cool.haxx.se
> Subject: Aw: Re: (Secure) Websockets using libcurl
> Message-ID:
>
> <trinity-83dd3f2b-6806-4713-a3df-51ca5d0164f2-1463588824252_at_3capp-webde-bap24
> >
>
> Content-Type: text/plain; charset=UTF-8
>
> On 18/05/16 11:25 Frank Meier wrote:
> > Hi Patrick
> >
> > If you like to get your hands dirty, you could have a look at my
> > approaches (patches) mentioned in
> > http://comments.gmane.org/gmane.comp.web.curl.library/45993.
> >
> > The second patch which enables you to retrieve the the active connection
> > socket I use productively for some time now.
> > cheers, Frank
>
> Hey,
> thank you for your answer.
>
> I am linking libcurl dynamically at the moment and I need to support
> different operating systems as well.
> So I would prefer a way without patching. (Static linking might not be a
> bad idea either (I will think about it ;) ).
>
> If I assume that there is no other way of achieving the reuse of an open
> TCP-Connection between two handles:
>
> Is there a way to parse the HTTP-Headers using the built-in libcurl
> functions? Or does one have to parse the Headers manually?
>
> Sincerely,
>
> Patrick Rathje
>
>
> ------------------------------
>
> Message: 7
> Date: Wed, 18 May 2016 12:39:29 -0400
> From: moparisthebest <admin_at_moparisthebest.com>
> To: libcurl development <curl-library_at_cool.haxx.se>
> Subject: Re: ALPN in ClientHello for protocols other than HTTP?
> Message-ID: <573C9AC1.9070200_at_moparisthebest.com>
> Content-Type: text/plain; charset=utf-8
>
> On 05/18/2016 03:55 AM, Daniel Stenberg wrote:
> > I guess ftp is there more for completeness rather than ftp servers
> > actually offering multiple protocols behind TLS.
> >
>
> Using something like sslh[1] any server can multiplex any protocol with
> ALPN (or by abusing SNI) right now. I currently host many different
> protocols/services behind TLS on port 443. :)
>
> [1]: http://www.rutschle.net/tech/sslh.shtml
>
>
> ------------------------------
>
> Message: 8
> Date: Wed, 18 May 2016 14:57:31 -0400
> From: Ray Satiro <raysatiro_at_yahoo.com>
> To: curl-library_at_cool.haxx.se
> Subject: Re: How to separate two different response
> Message-ID: <ec13fa0e-0bee-c7da-bb44-2c83c2d49cde_at_yahoo.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> On 5/18/2016 8:32 AM, Daniel Stenberg wrote:
> > On Wed, 18 May 2016, smruti kumari wrote:
> >
> >> Let's consider I have two enpoints E1, E2 and one server. E1 send a
> >> request to server and server forward to E2. E2 gives two responses to
> >> E1 via server.If these two response come together(one after another)
> >> then how can I separte it these two response since it's a stream?
> >
> > You have two transfers. E1 and E2. Then send and receive data. When
> > the write callback is invoked by libcurl, they get the pointer set
> > with CURLOPT_WRITEDATA passed to it as well. You can use that to pass
> > in whatever data you want to help your function figure out which
> > transfer the data belongs to.
> >
>
> I'm not sure this is what Smruti means. How are you using libcurl
> Smruti? Which protocol are you using? You will have to provide more
> details. To disambiguate this forget about endpoints and let's think in
> terms of client and server, client speaks first, server replies. He is
> E1 client with libcurl. E1 sends request to server. The question is
> about E2 and server, is E2 a client running libcurl? It doesn't sound
> like it.
>
>
> ------------------------------
>
> Message: 9
> Date: Thu, 19 May 2016 00:41:48 +0200
> From: Jan Ehrhardt <phpdev_at_ehrhardt.nl>
> To: libcurl development <curl-library_at_cool.haxx.se>
> Subject: Re: [RELEASE] curl and libcurl 7.49.0
> Message-ID: <3oqpjbpvd5ucsg1dll78ireic3rpn0ekli_at_4ax.com>
> Content-Type: text/plain; charset=us-ascii
>
> On Wed, 18 May 2016 08:22:55 +0200 (CEST), in gmane.comp.web.curl.library
> you wrote:
>
> > o winbuild: add mbedtls support [36]
>
> There was an addition in makefile.vc (*nix style wrapped):
>
> !IF DEFINED(WITH_SSL) && DEFINED(ENABLE_WINSSL) || \
> DEFINED(WITH_SSL) && DEFINED(WITH_MBEDTLS) || \
> DEFINED(WITH_MBEDTLS) && DEFINED(ENABLE_WINSSL)
>
> !ERROR WITH_SSL, WITH_MBEDTLS and ENABLE_WINSSL \
> are mutual exclusive options.
>
> !ENDIF
>
> The absence of parentheses around the && pairs give me the creeps. I guess
> it is wrong, but even if it works OK, it is really confusing.
>
> Besides that: it breaks build scripts with ENABLE_WINSSL=no, such as the
> ones the PHP devs are using in https://github.com/winlibs/cURL because
> WITH_SSL and ENABLE_WINSSL are both defined in these build scripts.
>
> A little bit later in the process I am running into this error:
>
> cl.exe /O2 /DNDEBUG /MD /DCURL_STATICLIB /I. /I ../lib
> /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL
> /I"../../win32build.vc14/include" /DUSE_OPENSSL /I"../
> ../win32build.vc14/include/openssl" /DUSE_NGHTTP2 /DHAVE_ZLIB_H
> /DHAVE_ZLIB /DHAVE_LIBZ /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32
> /DLIBSSH2_LIBRARY /DUSE_LIBSSH2 /I../../win32build.vc14/include/libssh2
> /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES /DUSE_IPV6 /DUSE_WINDOWS_SSPI
>
> /Fo"..\builds\libcurl-vc14-x86-release-static-ssl-static-zlib-static-ssh2-static-ipv6
> -sspi-obj-lib/vauth/vauth.obj" ..\lib\vauth\vauth.c
> vauth.c
> C:\php-sdk\curl-src\lib\vauth\vauth.c : fatal error C1083: Cannot open
> compiler generated file:
>
> 'C:\php-sdk\curl-src\builds\libcurl-vc14-x86-release-static-ssl-static-zlib-static-ssh2-static-ipv6-sspi-obj-lib\vauth\vauth.obj':
> No such file or directory
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
> Studio 14.0\VC\BIN\cl.exe"' : return code '0x1'
> Stop.
>
> I have to manually create the directory
>
> C:\php-sdk\curl-src\builds\libcurl-vc14-x86-release-static-ssl-static-zlib-static-ssh2-static-ipv6-sspi-obj-lib\vauth\
> to overcome this error.
>
> Both errors are nog big deal, but I was surprised that the winbuild
> scripts failed all of a sudden.
>
> Jan
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> curl-library mailing list
> curl-library_at_cool.haxx.se
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-library
>
>
> ------------------------------
>
> End of curl-library Digest, Vol 129, Issue 28
> *********************************************
>

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-05-19