cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1338648 ] --max-redirs 0 is ignored

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Thu, 27 Oct 2005 07:45:28 -0700

Bugs item #1338648, was opened at 2005-10-26 10:05
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1338648&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: http
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: --max-redirs 0 is ignored

Initial Comment:
I would expect

curl --location --max-redirs 0 http://$url_that_redirects

to make curl return an error (47) if the url is redirected.
Instead it follows the redirect (even multiple ones).

I have attached a patch which fixes this. I am not certain
if this is the right way - but it seems to work for my
simple testcases.

Hmmm - sourceforge tells me to fill in my name and
email, but there are no fields for it. Guess here will do:

Nis Jorgensen
nis.jorgensen_at_int.greenpeace.org

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2005-10-27 07:45

Message:
Logged In: NO

I want curl to return an error if the url is redirected, rather than
output the response. This is for use as part of a larger script.

BTW: I have a suspicion that my patch will change standard
libcurl behavior (when no options are set), but do not have an
easy way to test it.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2005-10-26 13:56

Message:
Logged In: YES
user_id=1110

Out of curiosity, why are you using --location if you don't
want it to follow _any_ Location:?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1338648&group_id=976
Received on 2005-10-27

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET