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: Regarding curl_easy_reset behavior in case of in-transit request/response

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 15 Feb 2021 14:29:28 +0100 (CET)

On Mon, 15 Feb 2021, Kiran kantilal Mehta via curl-library wrote:

> If an application makes a request to a server using libcurl and before
> response is fully received from the server, if application resets the
> handle, sends a new request to the same server, what will the status of old
> request ?

Surely you stopped that transfer somehow before you reset the handle? If
you're using the easy interface you have to, and if you use the multi
interface you call curl_multi_remove_handle() before you reset it, right?

That removal stops the transfer.

> Since the handle was reset but connection is the same, is application
> expected to handle old response or will that be automatically be dropped by
> libcurl ?

Stopping a transfer before it is complete will cause the connection to get
disconnected since then it cannot be reused.

-- 
  / 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-02-15