curl-library
NTLM proxy nightmare - POST problem?
Date: Wed, 07 Mar 2007 14:26:44 -0500
I'm having a bit of a nightmare, trying to get libcurl to work with
NTLM (don't yell at me - it's a customer who uses it). As of right
now, I have the latest source from the CVS, running on Windows, both
using curllib built using SSPI and NTLM in my app, and curl.exe built
using Cygwin. Both of these apps fail when I use proxy-anyauth for
an NTLM proxy, and try to do a POST. Curl gets into some kind of loop
and just hangs. GET works okay in curl.exe. And, in fact, if I add the
-G option, curl.exe works too.
Here's my curl command line:
curl --proxy-anyauth -x proxyusername:proxypassword@isa.insors.net:8080 -u "httpusername:httppassword" http://test.example.com/test.cgi -d REMURL=1
With, of course, passwords and actual url redacted. I get the following
Wireshark (nee Ethereal) sniff, and then it hangs.
POST http://igmeeting.insors.net/igpix/ HTTP/1.1
Authorization: Basic amFybm9sZEBpbnNvcnMuY29tOmlnbTEyMw==
User-Agent: curl/7.15.4 (i686-pc-cygwin) libcurl/7.15.4 OpenSSL/0.9.8e zlib/1.2.3
Host: igmeeting.insors.net
Pragma: no-cache
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 8
Content-Type: application/x-www-form-urlencoded
REMURL=1HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. )
Via: 1.1 INSORS-SERVER
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: 4099
<!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-LEFT: #955319 0px solid; COLOR: #955319; BORDER-BOTTOM: #955319 1px solid; FONT-FAMILY: 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-LEFT: #955319 1px solid; COLOR: #978c79; BORDER-BOTTOM: #955319 1px solid; FONT-FAMILY: 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-WEIGHT: normal; FONT-SIZE: 12pt; BORDER-LEFT: #955319 1px solid; COLOR: #7b3807; BORDER-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=TitleDescription> 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 reach 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 clicking the Refresh button. The timeout may have occurred due to Internet congestion.
<LI id=L_default_7><B>Check spelling:</B> Check that you typed the Web page address 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 contacting 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 personnel)</B>
<UL class=adminList>
<LI id=L_default_11>Error Code: 407 Proxy Authentication Required. The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. (12209)
<LI id=L_default_12>IP Address: 192.168.0.1
<LI id=L_default_13>Date: 3/7/2007 7:15:30 PM
<LI id=L_default_14>Server: INSORS-SERVER
<LI id=L_default_15>Source: proxy
</UL>
</TD>
</TR>
</TBODY>
</TABLE>
</BODY>
</HTML>
-- Jonathan Arnold Software Engineer inSORS Integrated Communications, Inc jarnold_at_insors.com Office/fax: 781.391.2818Received on 2007-03-07