curl / Mailing Lists / curl-library / 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: Callback right after an Easy is Assigned a Connection?

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 18 Jun 2020 00:43:46 +0200 (CEST)

On Mon, 15 Jun 2020, Damon Earp via curl-library wrote:

> Currently we are generating the 'Authorization:' header before submitting
> the easy handle to our multi handle. While this has been working for us,
> we've had several events where the multi's backlog of easy handles is long
> enough that the HMAC TTL expires. We don't have HTTP/1.1 pipelining enabled
> (got the impression pipelining is being removed from libcurl), and do set
> connection limits to help keep our clients from overloading servers.

So how long is that TTL? And yes, Pipelining was never totally reliable and
has been removed for a while now.

> 1. Are we doing this wrong? Manually setting the Date header and calculating
> the HMAC before submitting? We still support older curls and haven't looked
> into newer features, as old as v7.29 sadly.

Yes that is... very old. But yes it sounds like a doable approach.

> 2. Is there a straight forward way for curl to inform an application that it
> is ready to use a connection, allowing the application to alter the headers?

No there isn't. That's not a feature curl offers.

I would probably rather recommend that you do the queueing of handles yourself
and that you generate the necessary headers just before you let curl perform
the transfer so that the TTL is still within time.

-- 
  / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2020-06-18