cURL / Mailing Lists / curl-library / Single Mail

curl-library

301/302 - Location relative?

From: Phred <phred53_at_hotmail.com>
Date: Thu, 20 Oct 2011 20:21:21 +1100

Using PHP libcurl and experiencing a problem with what looks like a
relative Location on a 302

First get url = hxxp://a.b.com/xp?q=1

301 - Location = hxxp://a.b.com/xp/?q=1

2nd get url = hxxp://a.b.com/xp/?q=1

302 - Location = //c.d.com/xp/?q=1 (note no hxxp://)

3rd get url = hxxp://a.b.com//c.d.com/xp/?q=1 (ends with 404)

Firefox (Live HTTP Headers) the 3rd get has: url =
hxxp://c.d.com/xp/?q=1 (ends with 200)

Is their a curl opt to get cURL behave like the browser on the 302?

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-20