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: Can I use curl_easy_setopt during curl_easy_perform.

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 16 Jul 2021 12:10:59 +0200 (CEST)

On Mon, 12 Jul 2021, Wu Yuanshou via curl-library wrote:

> Shall I call curl_easy_setopt() during curl_easy_perform() ? It seems like
> we should not do this according to the document I can find.Instead , I shall
> quit from the curl_easy_perform() function , apply the setting via
> curl_easy_setopt() and call curl_easy_perform() again.

Correct, that's the way the documentation encourages and that we guarantee.

There are a few options that users often rather want to modify at run-time,
like sometimes CURLOPT_MAX_RECV_SPEED_LARGE, and while there's no guarantee in
the docs or code, this typically works fine.

I would like us to at some point explictly mark and document which options
that are fine to update during a transfer.

-- 
  / 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.se/mail/etiquette.html
Received on 2021-07-16