Well, I'm using java version "1.4.1_01". Acording to
the Url
http://developer.java.sun.com/developer/bugParade/bugs/4720715.html
using URL.openConnection() to fetch an FTP URL that
includes
user and password does not work through a proxy.
This is only fixed in 1.4.2, so for now, it won't work.
Just in case anyone runs into this.
Thank you for all your replies. I appreciate it!!
Delia
On Fri, 08 Nov 2002, "Delia Micu" wrote:
>
>
> Thank you so much for the replies. I still can't get
> Squid to forward the username and password. The
client
> uses the HttpUtils found at Apache link
> <a
href="http://mail.telocity.com/jump/http://jakarta.apache.org/turbine/maven/xref/org/apache/maven/util/HttpUtils.html">http://jakarta.apache.org/turbine/maven/xref/org/apache/maven/util/HttpUtils.html</a>
>
> Squid runs on a separate server, and the FTP server
on
> a third server.
>
> When calling the HttpUtils I have:
>
> URLConnect.getFile(new
> URL("<a
href="http://mail.telocity.com/jump/ftp://10.0.12.62/updates.xml"">ftp://10.0.12.62/updates.xml"</a>;),
> new File("/root/tmp/updatesFTPed.xml"), null,
> true, false, false, "djmicu", "djmicu", "
> 10.0.12.101", "3128", null, null);
>
> where
> ftpServer = 10.0.12.62
> ftpUserName = djmicu
> ftpPassword = djmicu
> ProxyHost = 10.0.12.101
> ProxyPort = 3128
> no authentication for the Squid porxy.
>
> The URL used by the Java HttpUtils to create the
> URLConnection object is "<a
href="http://mail.telocity.com/jump/ftp://10.0.12.62/updates.xml"">ftp://10.0.12.62/updates.xml"</a>;
>
> But Squid does not pass the ftpUserName and password,
> instead it sends the FTP server user anonymous. Could
> it be some setting in my config file?
>
> Note, if I use the browser and type url
> <a
href="http://mail.telocity.com/jump/ftp://djmicu:djmicu@10.0.12.62/updates.xml">ftp://djmicu:djmicu@10.0.12.62/updates.xml</a>, I get the
> file retrieved. Browser has the proxy set for
> ProsyHost 10.0.12.101 on port 3128 for FTP.
>
> Please help me. I don't know what else to do to get
> this working correctly from Java.
>
> Thank you much!
>
> Delia
>
>
> Henrik Nordstrom wrote:
>
> >
> > fre 2002-11-08 klockan 10.12 skrev Robert Collins:
> >
> > > Thats the user interface. It's my understanding
the
> > browser->proxy
> > > interface is via HTTP authentication. Is there an
> RFC
> > on ftp access via
> > > HTTP? And I'd expected a Java class to work at the
> > header level, not a
> > > GUI style interface.
> >
> > To make sure there is no misunderstanding, here is a
> > description of what
> > Squid does:
> >
> > 1. If it receives a URL with password information
> > encoded in the URL
> > (<a
> href="<a
href="http://mail.telocity.com/jump/ftp://user:password@host">ftp://user:password@host</a>">http://mail.telocity.com/jump/ftp://user:password@host">ftp://user:password@host</a></a>;) this is used as
> the login
> > information to FTP.
> > This is the documented standard method for
requesting
> > non-anonymous FTP
> > via a URL.
> >
> > 2. If there is only a login (no password) in the
> > requested URL then
> > Squid will request Basic HTTP authentication from
the
> > browser to
> > complete the request.
> >
> >
> > Alternative 2 is not explicitly documented in
> standard,
> > but is
> > technically a valid thing to do as the HTTP proxy is
> > acting as a HTTP
> > gateway server when processing ftp:// requests. As
it
> > is not explicitly
> > documented not all browsers expects this to happen.
> >
> > Regards
> > Henrik
Received on Fri Nov 08 2002 - 16:08:53 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:11:15 MST