curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: bash curl multiple requests same connection

From: X M via curl-users <curl-users_at_cool.haxx.se>
Date: Thu, 12 Mar 2020 13:00:17 +0100


Hello,

I guess that indeed you need to wait for "18.12 keep running, read instructions from pipe/socket" to be released some day

Or may be one of those :

- https://github.com/curl/curl/wiki/curl-tool-master-client
- https://curl.haxx.se/mail/archive-2014-06/0022.html

(Curl is a beauty and is already doing so much, but unfortunately this subject don't really get traction)

@Dan, @Daniel : This is my annual ping for this request ;)

Please make curl able to keep getting new instructions in a "-K style" without waiting for EOF

Regards

Xavier
Le jeudi 12 mars 2020 à 12:20:18 UTC+1, taylor park via curl-users <curl-users_at_cool.haxx.se> a écrit :

Unfortunately I only use bash script.

Dan Fandrich via curl-users <curl-users_at_cool.haxx.se> 于2020年3月12日周四 下午6:56写道:
On Thu, Mar 12, 2020 at 06:38:40PM +0800, taylor park via curl-users wrote:
> https://ec.haxx.se/usingcurl/usingcurl-persist :
> The curl command-line tool can, however, only keep connections alive for as
> long as it runs, so as soon as it exits back to your command line it has to
> close down all currently open connections (and also free and clean up all the
> other caches it uses to decrease time of subsequent operations)
>
> Creating a TCP connection takes some time
> so i want send tow requests use the same connection
> The second request needs to be submitted after processing the first response。

Your example provided two requests and those two will be sent on the same
connection. But, once that second one is complete the tool will exit and any
subsequent transfer will need to establish a new connection. If you then want
a third request to use the same connection then you'll need the feature I
mention in my other message or to write your code in Python or some other
scripting language using libcurl, where it will have full control over the
connections.

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

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-03-12