Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I trying to access the following site with cURL. (https://www.fleetagent.be) I have cURL configured with the following switches -L -k --proxy [username:password] I get the following error. What switches do need to add to get cURL to get the website?

The url https://www.fleetagent.be is redirected to https://www.fleetagent.be/portal/pls/portal. Somehow the website is authenticating it self for the redirected portal. how can i simulate this behavior with cURL?

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>401 Unauthorized</TITLE>
</HEAD><BODY>
<H1>Unauthorized</H1>
This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.<P>
<P>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.
</BODY></HTML>

Thanks. Darrell.

share|improve this question

1 Answer 1

I asume you have an account for this portal. Add it to your curl call:

--user <user[:password]> Set server user and password

curl -L -k --proxy [username:password] --user <user[:password]> https://www.fleetagent.be/portal/pls/portal

You are only submitting username and password for the proxy, but not for the actual website.

share|improve this answer
    
This is the command i'm using now. I'm aware that the username/password is not for the website but for the proxy. De problem is I still get the error. My current configfile contains this: # volg http redirects -L # negeer certificaaten -k # proxy instellingen --proxy prxn001:8080 --proxy-ntlm --proxy-user txxxxxxb:cxxxxxxxx –  DeChinees Jan 7 '11 at 10:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.