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.

CUSTOMREQUEST + FOLLOWLOCATION

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 31 Jul 2019 16:46:02 +0200 (CEST)

Hey team,

I have PR #3803 [1] queued up that I'm looking for some thumbs up or down on.

The problem it addresses:

  A user sets CUSTOMREQUEST to a string and enables FOLLOWLOCATION. When
  libcurl follows a redirect, it will use the CUSTOMREQUEST even in the
  susequent followed-to URL which in some/many cases is not what the user
  want and is not really what the HTTP response code says either. This is
  occasionally also seen when users superfluously use -X on curl command
  lines...

The proposed change:

  The PR introduces a new bit for the CURLOPT_FOLLOWLOCATION option that if
  set, will make libcurl *NOT* use the custom method string when it follows a
  redirect when the HTTP response code says so.

To ponder about:

  1. Is it worth the added complexity with yet another knob?

  2. This doesn't solve the -X issue since we don't want to break the existing
     functionality where users want the current behavior. Should we add a -X
     alternative for this?

Thoughts?

[1] = https://github.com/curl/curl/pull/3803

-- 
  / daniel.haxx.se | Get the best commercial curl support there is - from me
                   | 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 2019-07-31