curl-users
Re: curl waits for stdin to "EOF" before firing requests when "-K -" is used to read config from stdin
Date: Wed, 16 Dec 2015 15:38:25 +0100
Hello,
El 15 de diciembre de 2015 18:16:43 CET, "Xavier !! <M X > via curl-users" <curl-users_at_cool.haxx.se> escribió:
>Hello curl-users,
>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
>Ex : Requests will wait (3*3) 9 seconds before being sent
>for i in {1..3}; do echo "url = http://127.0.0.1/$i"; sleep 3;done |
>curl -vK -
>Is there any way to avoid that and make curl execute each request as
>soon as they are coming from stdin ?
>
>I tried to use "next' to force curl to separate operations, and fire
>requests immediately, but with no luck
>Ex : Requests will still wait (3*3) 9 seconds before being sent
>for i in {1..3}; do echo "url = http://127.0.0.1/$i"; echo "next";
>sleep 1;done | curl -vK -
>When dealing with a large stream of config input sent to the curl
>stdin, it could be helpful/more performant to execute each request
>without waiting for all of them to be "computed"
>(For performance reasons, we sometimes want/need to keep connexions
>opened and re-use existing connection : Executing curl n times is not
>an option in this situation)
>
>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 ?
Maybe could be implemented a curl daemon, curld named?, which listen on a socket or tcp port receive a url and maybe more thing and return the http reply? I think there is not such daemon
-------------------------------------------------------------------
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-16