Buy commercial curl support. 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 Daniel himself.
RE: how to keep connection open after receiving the last response?
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se>
Date: Fri, 17 Oct 2025 08:22:07 +0200 (CEST)
On Wed, 15 Oct 2025, adrien.kunysz_at_swisstopo.ch wrote:
>> What exactly what that be useful for except for your quite particular niche
>> use case?
>
> I agree it's a niche use case and if the point of curl is to transfer file
> (as opposed to troubleshoot HTTP services; although that's mostly what I use
> it for), it might not be a suitable feature.
I would propose you do it like this, which uses already existing
functionality:
$ curl URL1 URL2 URL1
... and you have the server side delay the URL2 response a suitable time. If
the server kept the connection to the first URL1 alive, the second URL1
transfer will reuse the connection fine. If it didn't, the second URL1 will
create a new connection.
Date: Fri, 17 Oct 2025 08:22:07 +0200 (CEST)
On Wed, 15 Oct 2025, adrien.kunysz_at_swisstopo.ch wrote:
>> What exactly what that be useful for except for your quite particular niche
>> use case?
>
> I agree it's a niche use case and if the point of curl is to transfer file
> (as opposed to troubleshoot HTTP services; although that's mostly what I use
> it for), it might not be a suitable feature.
I would propose you do it like this, which uses already existing
functionality:
$ curl URL1 URL2 URL1
... and you have the server side delay the URL2 response a suitable time. If
the server kept the connection to the first URL1 alive, the second URL1
transfer will reuse the connection fine. If it didn't, the second URL1 will
create a new connection.
-- / daniel.haxx.se || https://rock-solid.curl.dev -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2025-10-17