cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Error 407 with Proxy authentication

From: AMBROSINI Marco <m.ambrosini_at_itcgr.net>
Date: Wed, 29 Apr 2009 09:13:32 +0200

Hi,

>Are you just making the one attempt to get through the proxy?? I once had a problem with a proxy where I had >to make the first attempt without the userid/passwd, get the "proxy auth required" response, then try again >*with* the userid/passwd. It would not let me get through on the first try, even with the userid/passwd.

I'm making only one attempt, but I run the same curl instruction many times...how did you make 2 attempts? Simply running the instruction 2 times?

>BTW, you should change that password - the encoding is really easy to reverse...
My first goal is to make it work, after I'll adjust also this point :)

Thank you for your help (I need to make it work! :P ) ... I copy here the tests I did with verbose and with -anyauth...same result:

-----------------------------------------------------------------------------------
C:\Program Files\CURL\CURL>curl -v -u DOMAIN\user -x 10.10.82.13:80 http:/
/www.google.com
Enter host password for user 'DOMAIN\user':
* About to connect() to proxy 10.10.82.13 port 80 (#0)
* Trying 10.10.82.13... connected
* Connected to 10.10.82.13 (10.10.82.13) port 80 (#0)
* Server auth using Basic with user 'DOMAIN\user'
> GET http://www.google.com HTTP/1.1
> Authorization: Basic RE9NSVRDXHUwMTAxMDExMTE6dGF0b3BpdHRhMzc=
> User-Agent: curl/7.19.4 (i586-pc-mingw32msvc) libcurl/7.19.4 OpenSSL/0.9.8k zl
ib/1.2.3
> Host: www.google.com
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authoriza
tion to fulfill the request. Access to the Web Proxy filter is denied. )
< Via: 1.1 ISA02
< Proxy-Authenticate: Negotiate
< Proxy-Authenticate: Kerberos
< Proxy-Authenticate: NTLM
< Connection: Keep-Alive
< Proxy-Connection: Keep-Alive
< Pragma: no-cache
< Cache-Control: no-cache
< Content-Type: text/html
< Content-Length: 4111
<
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Error Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<STYLE id=L_default_1>A {
        FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #005a80; FONT-FAMILY: tahoma
}
A:hover {
        FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #0d3372; FONT-FAMILY: tahoma
}
TD {
        FONT-SIZE: 8pt; FONT-FAMILY: tahoma
}
TD.titleBorder {
        BORDER-RIGHT: #955319 1px solid; BORDER-TOP: #955319 1px solid; PADDING-
LEFT: 8px; FONT-WEIGHT: bold; FONT-SIZE: 12pt; VERTICAL-ALIGN: middle; BORDER-LE
FT: #955319 0px solid; COLOR: #955319; BORDER-BOTTOM: #955319 1px solid; FONT-FA
MILY: tahoma; HEIGHT: 35px; BACKGROUND-COLOR: #d2b87a; TEXT-ALIGN: left
}
TD.titleBorder_x {
        BORDER-RIGHT: #955319 0px solid; BORDER-TOP: #955319 1px solid; PADDING-
LEFT: 8px; FONT-WEIGHT: bold; FONT-SIZE: 12pt; VERTICAL-ALIGN: middle; BORDER-LE
FT: #955319 1px solid; COLOR: #978c79; BORDER-BOTTOM: #955319 1px solid; FONT-FA
MILY: tahoma; HEIGHT: 35px; BACKGROUND-COLOR: #d2b87a; TEXT-ALIGN: left
}
.TitleDescription {
        FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: tahoma
}
SPAN.explain {
        FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: #934225
}
SPAN.TryThings {
        FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: #934225
}
.TryList {
        MARGIN-TOP: 5px; FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: black; FONT
-FAMILY: tahoma
}
.X {
        BORDER-RIGHT: #955319 1px solid; BORDER-TOP: #955319 1px solid; FONT-WEI
GHT: normal; FONT-SIZE: 12pt; BORDER-LEFT: #955319 1px solid; COLOR: #7b3807; BO
RDER-BOTTOM: #955319 1px solid; FONT-FAMILY: verdana; BACKGROUND-COLOR: #d1c2b4
}
.adminList {
        MARGIN-TOP: 2px
}
</STYLE>
<META content="MSHTML 6.00.2800.1170" name=GENERATOR></HEAD>
<BODY bgColor=#f3f3ed>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
  <TBODY>
  <TR>
    <TD class=titleborder_x width=30>
      <TABLE height=25 cellSpacing=2 cellPadding=0 width=25 bgColor=black>
        <TBODY>
        <TR>
          <TD class=x vAlign=center align=middle>X</TD>
        </TR>
        </TBODY>
      </TABLE>
    </TD>
    <TD class=titleBorder id=L_default_2>Network Access Message:<SPAN class=Titl
eDescription> The page cannot be displayed</SPAN> </TD>
  </TR>
  </TBODY>
</TABLE>

<TABLE id=spacer>
  <TBODY>
  <TR>
    <TD height=10></TD></TR></TBODY></TABLE>
<TABLE width=400>
  <TBODY>
  <TR>
    <TD noWrap width=25></TD>
    <TD width=400><SPAN class=explain><ID id=L_default_3><B>Explanation:</B></ID
></SPAN><ID id=L_default_4> There is a problem with the page you are trying to r
each and it cannot be displayed. </ID><BR><BR>
    <B><SPAN class=tryThings><ID id=L_default_5><B>Try the following:</B></ID></
SPAN></B>
      <UL class=TryList>
        <LI id=L_default_6><B>Refresh page:</B> Search for the page again by cli
cking the Refresh button. The timeout may have occurred due to Internet congesti
on.
<LI id=L_default_7><B>Check spelling:</B> Check that you typed the Web page addr
ess correctly. The address may have been mistyped.
<LI id=L_default_8><B>Access from a link:</B> If there is a link to the page you
 are looking for, try accessing the page from that link.

      </UL>
<ID id=L_default_9>If you are still not able to view the requested page, try con
tacting your administrator or Helpdesk.</ID> <BR><BR>
    </TD>
  </TR>
  </TBODY>
</TABLE>

<TABLE id=spacer><TBODY><TR><TD height=15></TD></TR></TBODY></TABLE>

<TABLE width=400>
  <TBODY>
  <TR>
    <TD noWrap width=25></TD>
    <TD width=400 id=L_default_10><B>Technical Information (for support personne
l)</B>
      <UL class=adminList>
        <LI id=L_default_11>Error Code: 407 Proxy Authentication Required. The I
SA Server requires authorization to fulfill the request. Access to the Web Proxy
 filter is denied. (12209)
<LI id=L_default_12>IP Address: 10.10.82.13
<LI id=L_default_13>Date: 4/29/2009 7:01:12 AM
<LI id=L_default_14>Server: isa02.domain
<LI id=L_default_15>Source: proxy

      </UL>
    </TD>
  </TR>
  </TBODY>
</TABLE>

</BODY>
</HTML>

* Connection #0 to host 10.10.82.13 left intact
* Closing connection #0

C:\Program Files\CURL\CURL>curl -v -u DOMAIN\user -x 10.10.82.13:80 --anya
uth http://www.google.com
Enter host password for user 'DOMAIN\user':
* About to connect() to proxy 10.10.82.13 port 80 (#0)
* Trying 10.10.82.13... connected
* Connected to 10.10.82.13 (10.10.82.13) port 80 (#0)
> GET http://www.google.com HTTP/1.1
> User-Agent: curl/7.19.4 (i586-pc-mingw32msvc) libcurl/7.19.4 OpenSSL/0.9.8k zl
ib/1.2.3
> Host: www.google.com
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authoriza
tion to fulfill the request. Access to the Web Proxy filter is denied. )
< Via: 1.1 ISA02
< Proxy-Authenticate: Negotiate
< Proxy-Authenticate: Kerberos
< Proxy-Authenticate: NTLM
< Connection: Keep-Alive
< Proxy-Connection: Keep-Alive
< Pragma: no-cache
< Cache-Control: no-cache
< Content-Type: text/html
< Content-Length: 4111
<
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Error Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<STYLE id=L_default_1>A {
        FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #005a80; FONT-FAMILY: tahoma
}
A:hover {
        FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #0d3372; FONT-FAMILY: tahoma
}
TD {
        FONT-SIZE: 8pt; FONT-FAMILY: tahoma
}
TD.titleBorder {
        BORDER-RIGHT: #955319 1px solid; BORDER-TOP: #955319 1px solid; PADDING-
LEFT: 8px; FONT-WEIGHT: bold; FONT-SIZE: 12pt; VERTICAL-ALIGN: middle; BORDER-LE
FT: #955319 0px solid; COLOR: #955319; BORDER-BOTTOM: #955319 1px solid; FONT-FA
MILY: tahoma; HEIGHT: 35px; BACKGROUND-COLOR: #d2b87a; TEXT-ALIGN: left
}
TD.titleBorder_x {
        BORDER-RIGHT: #955319 0px solid; BORDER-TOP: #955319 1px solid; PADDING-
LEFT: 8px; FONT-WEIGHT: bold; FONT-SIZE: 12pt; VERTICAL-ALIGN: middle; BORDER-LE
FT: #955319 1px solid; COLOR: #978c79; BORDER-BOTTOM: #955319 1px solid; FONT-FA
MILY: tahoma; HEIGHT: 35px; BACKGROUND-COLOR: #d2b87a; TEXT-ALIGN: left
}
.TitleDescription {
        FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: tahoma
}
SPAN.explain {
        FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: #934225
}
SPAN.TryThings {
        FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: #934225
}
.TryList {
        MARGIN-TOP: 5px; FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: black; FONT
-FAMILY: tahoma
}
.X {
        BORDER-RIGHT: #955319 1px solid; BORDER-TOP: #955319 1px solid; FONT-WEI
GHT: normal; FONT-SIZE: 12pt; BORDER-LEFT: #955319 1px solid; COLOR: #7b3807; BO
RDER-BOTTOM: #955319 1px solid; FONT-FAMILY: verdana; BACKGROUND-COLOR: #d1c2b4
}
.adminList {
        MARGIN-TOP: 2px
}
</STYLE>
<META content="MSHTML 6.00.2800.1170" name=GENERATOR></HEAD>
<BODY bgColor=#f3f3ed>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
  <TBODY>
  <TR>
    <TD class=titleborder_x width=30>
      <TABLE height=25 cellSpacing=2 cellPadding=0 width=25 bgColor=black>
        <TBODY>
        <TR>
          <TD class=x vAlign=center align=middle>X</TD>
        </TR>
        </TBODY>
      </TABLE>
    </TD>
    <TD class=titleBorder id=L_default_2>Network Access Message:<SPAN class=Titl
eDescription> The page cannot be displayed</SPAN> </TD>
  </TR>
  </TBODY>
</TABLE>

<TABLE id=spacer>
  <TBODY>
  <TR>
    <TD height=10></TD></TR></TBODY></TABLE>
<TABLE width=400>
  <TBODY>
  <TR>
    <TD noWrap width=25></TD>
    <TD width=400><SPAN class=explain><ID id=L_default_3><B>Explanation:</B></ID
></SPAN><ID id=L_default_4> There is a problem with the page you are trying to r
each and it cannot be displayed. </ID><BR><BR>
    <B><SPAN class=tryThings><ID id=L_default_5><B>Try the following:</B></ID></
SPAN></B>
      <UL class=TryList>
        <LI id=L_default_6><B>Refresh page:</B> Search for the page again by cli
cking the Refresh button. The timeout may have occurred due to Internet congesti
on.
<LI id=L_default_7><B>Check spelling:</B> Check that you typed the Web page addr
ess correctly. The address may have been mistyped.
<LI id=L_default_8><B>Access from a link:</B> If there is a link to the page you
 are looking for, try accessing the page from that link.

      </UL>
<ID id=L_default_9>If you are still not able to view the requested page, try con
tacting your administrator or Helpdesk.</ID> <BR><BR>
    </TD>
  </TR>
  </TBODY>
</TABLE>

<TABLE id=spacer><TBODY><TR><TD height=15></TD></TR></TBODY></TABLE>

<TABLE width=400>
  <TBODY>
  <TR>
    <TD noWrap width=25></TD>
    <TD width=400 id=L_default_10><B>Technical Information (for support personne
l)</B>
      <UL class=adminList>
        <LI id=L_default_11>Error Code: 407 Proxy Authentication Required. The I
SA Server requires authorization to fulfill the request. Access to the Web Proxy
 filter is denied. (12209)
<LI id=L_default_12>IP Address: 10.10.82.13
<LI id=L_default_13>Date: 4/29/2009 7:04:06 AM
<LI id=L_default_14>Server: isa02.domain
<LI id=L_default_15>Source: proxy

      </UL>
    </TD>
  </TR>
  </TBODY>
</TABLE>

</BODY>
</HTML>

* Connection #0 to host 10.10.82.13 left intact
* Closing connection #0

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Tuesday, April 28, 2009 11:34 PM
To: libcurl development
Subject: Re: Error 407 with Proxy authentication

On Tue, 28 Apr 2009, AMBROSINI Marco wrote:

> curl -u DOMAIN\USER -x myproxy:Port http://www.google.com
>
> to get Google page testing the proxy configuration, I get the error
> "Error code: 407 proxy authentication required

Add -v too, and check the response headers. I'm sure it says it wants
some
other authorization method than plain Basic, which curl defaults to.

Are you just making the one attempt to get through the proxy??  I once had a problem with a proxy where I had to make the first attempt without the userid/passwd, get the "proxy auth required" response, then try again *with* the userid/passwd.  It would not let me get through on the first try, even with the userid/passwd.

BTW, you should change that password - the encoding is really easy to reverse...

Ralph Mitchell
Received on 2009-04-29