cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1249962 ] FTP via HTTP Proxy/NTLM Auth Bad Output

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 01 Aug 2005 20:42:23 -0700

Bugs item #1249962, was opened at 2005-08-01 20:42
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1249962&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: FTP via HTTP Proxy/NTLM Auth Bad Output

Initial Comment:
When trying to use NTLM/HTTP Proxy with FTP, the
resulting output includes the 407 Error HTML at the top
of the file.

Command example:

curl -O --proxy-ntlm --proxy http://some.proxy:80
--proxy-user domain\user:password
ftp://someftpserver/somefile

Environment: FreeBSD 4.5 Ports Collection (i386)

Result is the HTML output from the original
"Authentication Required" HTML page prepended to the
actual file.

This is seen in 7.13.1. I checked 7.14.0 and CVS and
did not see any comments or changes in the code that
obviously fixed this issue.

Based on some experiments with the -v option and
various ftp and http attempts, my temporary fix was to
change the following line in libcurl's transfer.c
function Curl_readwrite() where the comment is
indicating that "These checks are only made the first
time we are about to write a piece of the body"

if(conn->protocol&PROT_HTTP) {

to

if(conn->protocol&(PROT_HTTP|PROT_FTP)) {

This is a hack at best, as I am sure the correct
solution will involve looking to see if this is an
authentication failure during a proxied FTP or possibly
other non-HTTP protocol attempt, but it got the job
done for me tonight.

Hope this is enough for someone who knows the code much
better than I to get a proper solution committed.

Thanks for your efforts.

--
Jon Grubbs
jon.grubbs_at_ins.com
----------------------------------------------------------------------
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1249962&group_id=976
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-tracker
Received on 2005-08-02

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET