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: CURLINFO_REDIRECT_COUNT

From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 6 Dec 2022 08:49:46 +0100 (CET)

On Mon, 5 Dec 2022, MellergÄrd, Daniel via curl-library wrote:

> For requests that I make, I get that one (1) redirects has been made,
> although the CURLINFO_EFFECTIVE_URL are exactly the same as CURLOPT_URL. The
> easy handles has not been cleaned up in between transfers. I can not tell if
> the handle has been use previously without deeper investigation. I do get a
> transfer with zero (0) redirects initially, but not for successive transfers
> to the same host it seems.

Without more detail it's not possisble to tell. Auth maybe?

If you set CURLOPT_VERBOSE to 1L, you can probably see it.

> Also, a related question. Will repeated requests to the same URL with
> different query parameters be using a redirected URL immediately, if the 301
> or 308 response codes have been received in a previous transfer (with other
> query parameters)?

Nope.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-12-06