Re: Compiling libcurl with c-ares

2018-08-08 Thread René Berber via curl-library
On 8/8/2018 4:43 PM, Yaakov Roth via curl-library wrote:

> I've done a git clone of the latest curl release and wanted to know
> which flags I need to pass to configure to compile with c-ares.

--enable-ares
-- 
R. Berber
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: multi_socket and epoll example

2018-08-08 Thread James Read via curl-library
>
> and make sure the application works correctly when using a small amount of
>> transfers - perhaps a single one to start with - and then add more when
>> you've confirmed that.
>
>
Everything seems to work fine. With a single URL and with multiple URLs.
The only issue I have is the throughput.
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: Windows users! Help us test upload performance tuning?

2018-08-08 Thread Gisle Vanem via curl-library

Jan Ehrhardt wrote:


I ended up with a Windows port of lftp, launched from a bash script. Curl sftp
did resume, but was terribly slow. 


I also just tested with 'curl sftp//:' with the latest libssh2
and the new 'SIO_IDEAL_SEND_BACKLOG_QUERY' option. 'sftp://' is
still 6 times slower than ftp against the same server in Denmark.

33.153s vs 5.4s for a 10 MByte file.

--
--gv
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Compiling libcurl with c-ares

2018-08-08 Thread Yaakov Roth via curl-library
Hi,

I've done a git clone of the latest curl release and wanted to know which
flags I need to pass to configure to compile with c-ares.

thanks,
Yaakov
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: Curl closing connection in case of incomplete transfer

2018-08-08 Thread Daniel Stenberg via curl-library

On Wed, 8 Aug 2018, Antoine Magaud via curl-library wrote:


I'm kinda new to using libcurl, and am facing an issue which I can't
around. I am using curl version 7.41.0.


That version is 3.5 years old and has no less than 42 known vulnerabilities!

it is related to not reading the whole file, because I did more tests with 
small files (less than the size I want to read), and in that case the 
connection is not closed, I get the message CURLMSG_DONEand can re-use the 
existing connection as many times as I want. I'm probably missing something 
here, I would expect the connection to stay open even if I don't read the 
whole file. Do I need to do something specific for the connection not to be 
closed?


It is exactly because of that, and there's nothing you can do to stop it other 
than reading the full file! :-/


The reason is that just reading a part of the file and then stopping, leaves 
the control channel in a state that cannot easily be used again without weird 
behaviors or hangs. The exact behaviors will also depend on the specific FTP 
server implementations.


So, libcurl does this to take the safe route.

--

 / daniel.haxx.se
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Curl closing connection in case of incomplete transfer

2018-08-08 Thread Antoine Magaud via curl-library
Hello,
I'm kinda new to using libcurl, and am facing an issue which I can't 
around. I am using curl version 7.41.0.
The scenario is the following: I want to read a file on an FTP server 
(partially, only the first few MB of the file), and then keep the 
connection open to read another file in the same folder. To do that I am 
using a multi handle, to which I add an easy handle, and perform requests 
on the multi handle. After I've read enough I remove the easy from the 
multi, and at that time I get a "Closing connection 0" message. I am sure 
it is related to not reading the whole file, because I did more tests with 
small files (less than the size I want to read), and in that case the 
connection is not closed, I get the message CURLMSG_DONEand can re-use the 
existing connection as many times as I want.
I'm probably missing something here, I would expect the connection to stay 
open even if I don't read the whole file. Do I need to do something 
specific for the connection not to be closed?

Thanks in advance for the help!---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: Application to request http2 content with multiplexed multiple streams

2018-08-08 Thread Daniel Stenberg via curl-library

On Tue, 7 Aug 2018, Rajvardhan Deshmukh wrote:


I looks fine, and you can verify yourself by reading the verbose
output as it states clearly when it reuses connections.


It reuses some connections and most of the times it says " * Connection 75 
seems to be dead!


* Closing connection 75 " and uses new one. Should i use some additional 
functionality that will keep the connection alive in all cases?


Normally that "seems to be dead" situation happens when the other side or a 
NAT/firewall in the middle have deemed the connection idle and it has been 
killed off.


to get responses back to back (after one is downloaded request for the next) 
should i do something else (other than using curl_multi_perform() in a loop)? 
Do you mean i should include sleep so that it doesn't use the 100% of CPU?


If you look at the multi-using examples, they all use select() or 
curl_multi_wait() in the loop to avoid it from spinning 100%. If there's 
nothing to do, there's no point in looping...


--

 / daniel.haxx.se
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: Windows users! Help us test upload performance tuning?

2018-08-08 Thread Daniel Stenberg via curl-library

On Wed, 8 Aug 2018, Daniel Stenberg via curl-library wrote:

Right, that's a valid remark. But let's address that issue if/when someone 
actually gets a problem with it...


Merged now!

--

 / daniel.haxx.se
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: Windows and CA certificates

2018-08-08 Thread Daniel Stenberg via curl-library

On Tue, 7 Aug 2018, Daniel Jeliński via curl-library wrote:

I recently started using HTTPS functionality with libcurl + openSSL; I 
noticed that by default this combo does not use Windows certificates, but 
instead wants to load them from CA bundle. This poses a maintenance problem 
- the bundle needs to be manually refreshed every now and then by the 
application maintainer, which implies that the application requires a 
maintainer in the first place.


I would probably maintain that an application needs one *anyway* due to 
possible security vulnerabilities and what not.


Also, the CA bundle is supposed to be the certs of the CAs you *trust* so by 
using a separate one from Windows, your application can actually decide 
exactly which CAs to trust for your purposes rather than saying that you 
always trust all the CAs that have convinced Microsoft to ship their certs.


Windows certificates are updated automatically as long as the machine is 
connected to the Internet. Should libcurl load Windows certificates when 
started on Windows?


...

I'm currently running code based on a sample found in the mailing list 
archive [1], and it works just fine. I would like to offload its 
functionality to libcurl. What do you think?


Yes please! I'm pretty sure you'll find many libcurl-openssl users on Windows 
who would love to get that option!


--

 / daniel.haxx.se---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: multi_socket and epoll example

2018-08-08 Thread Daniel Stenberg via curl-library

On Tue, 7 Aug 2018, James Read wrote:

As long as libcurl is built to use the threaded resolver (default) or the 
c-ares backend, it will do name resolving in a non-blocking manner.


I just did a standard install using the latest git clone.


Then it probably built with the threaded resolver. At the end of the configure 
run it says which one it will build with (and the curl -V output subtly 
reveals the info too).


On another note. I've just tested ephiperfifo with a 100k domains. 
Throughput is below what I was expecting (hoping for). It started off at 
about 600KB/sec and then dropped to around 40KB/sec.


There are like a million factors that all work together and in this statement 
you put them all together.


First, I think you should understand the API properly and make sure that's 
used correctly. Then you should start small and get data from URLs that really 
will give you high speed transfers and make sure the application works 
correctly when using a small amount of transfers - perhaps a single one to 
start with - and then add more when you've confirmed that.


--

 / daniel.haxx.se
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html