cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl waits for stdin to "EOF" before firing requests when "-K -" is used to read config from stdin

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 15 Dec 2015 22:47:54 +0100 (CET)

On Tue, 15 Dec 2015, Xavier !! <M X > via curl-users wrote:

> With "-K -" used to read the config from the stdin, curl waits until no more
> input comes from stdin, and then executes all the HTTP requests 

Correct. It reads the entire config file first, then performs.

> Is there any way to avoid that and make curl execute each request as soon as
> they are coming from stdin ?

> Did I miss something, or is there really no way to achieve that in the
> current version ?Is this "just" not implemented or is there any reasons that
> would make such a behaviors impossible ?

If you think about it further, you realize it isn't possible. The options read
on the command line and config file are all considered, and their individual
order is mostly not important. It means that the entire config file needs to
be read first to get to know all the command line options that are used.

Also, the curl tool is not multi-threaded interally anyway and uses the
curl_easy_perform() function to do its transfers so it really cannot read from
any file like that while also transferring data so even if there would be a
separate option for this, it would be restricted - or require a larger
architectural rewrite to makae curl use the multi interface.

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-12-15