cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl reports: "Maximum (50) redirects followed"

From: Alex Vinnik <alvinnik.g_at_gmail.com>
Date: Wed, 27 Feb 2013 12:08:53 -0600

Got some input from chromium community...

https://groups.google.com/a/chromium.org/forum/?fromgroups=#!topic/chromium-discuss/Aa_gQn40-zE/overview

Looks like a bug to me as well. -Alex

On Tue, Feb 26, 2013 at 3:29 PM, Alex Vinnik <alvinnik.g_at_gmail.com> wrote:

> >Lots of cookies in that browser trace. What about enabling cookies in
> your >curl command? Also, sites are very frequently acting differently
> depending on >the headers used.
>
> same result
>
> ~$ ~/bin/curl --cookie-jar mycookie.jar -L "
> http://www.expedia.ca/pubspec/scripts/eap.asp?PRID=4&GOTO=PROMOS&Page=../../p/promos/winter-vacation-deals?langid=4105&AID=11259876&PID=3211374&affcid=network.cj.3211374.11259876
> ."
> curl: (47) Maximum (50) redirects followed
>
> Daniel,
>
> Just want to reiterate that in my original email I mentioned strange URL
> transformation
>
> 1. Server responds with this path to both curl and chrome
>
> /promos../../p/promos/winter-vacation-deals?langid=4105&affcid=network.cj.3211374.11259876.&affcid=cj"
> 2. Chrome transforms it to
> /p/promos/winter-vacation-deals?langid=4105&affcid=network.cj.3211374.11259876.&affcid=cj"
> 2. Curl doesn't change it and gets into infinite redirect loop
>
> When you try "modified" URL in curl then it works
> $ curl -o output -L "
> http://www.expedia.ca/p/promos/winter-vacation-deals?langid=4105&affcid=network.cj.3211374.11259876.&affcid=cj3211374
> "
> % Total % Received % Xferd Average Speed Time Time Time
> Current
> Dload Upload Total Spent Left
> Speed
> 100 88664 0 88664 0 0 45914 0 --:--:-- 0:00:01 --:--:--
> 48056
>
> Somehow chrome is aware about this malformed server response and takes
> care of it. Do you know why chrome messes around with location url? Thanks.
> -Alex
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-27