cURL / Mailing Lists / curl-library / Single Mail


Re: feature suggestion (with patch): callback function on http redirects

From: Daniel Stenberg <>
Date: Mon, 16 Jan 2012 15:01:40 +0100 (CET)

On Mon, 16 Jan 2012, Jochen Kornitzky wrote:

> I was looking to reduce the application complexity with a simple hack in
> libcurl.

Right. Adding complexity in libcurl rather than adding the logic in the
application. I don't quite see why it is simpler in libcurl than in the app

> Reading CURLINFO_REDIRECT_URL would be too late for that purpose as the url
> is already fetched when that info is available.

Why is that too late? There won't be any difference in how much data that is
downloaded and connections will be re-used to the exact same extent...

Note also that you call the callback a bit early so your callback won't get
the same absolute URL CURLINFO_REDIRECT_URL does.

List admin:
Received on 2012-01-16