curl-library
curl handling 403;4 redirection
Date: Thu, 25 Nov 2010 10:11:31 -0500
Hi,
I'm accessing an http page which the server redirect to an https page. This
is done via a 403:4 error page which contains custom javascript code to do
the redirection (via window.location). This work in all major browser, but
only loads 403;4 page in curl and does not redirect. I've tried several
options from the curl command line but nothing seems to work. Ideally i need
to have this working in libcurl. Any ideas?
The error redirection page is:
<html>
<head>
<script language="JavaScript">
<!-- begin hide
// This page is intended to be used as a Custom Error page for error 403;4
"Forb
idden - SSL required"
// It redirects HTTP requests to HTTPS
function goElseWhere()
{
var oldURL = window.location.hostname + window.location.pathname +
window.loca
tion.search;
var newURL = "https://" + oldURL;
window.location = newURL;
}
goElseWhere();
// end hide -->
</script>
</head>
<body>
</body>
</html>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-25