From sschwarzer at sschwarzer.net Fri Jan 26 23:53:22 2007 From: sschwarzer at sschwarzer.net (Stefan Schwarzer) Date: Fri, 26 Jan 2007 23:53:22 +0100 Subject: [ftputil] [ANN] ftputil 2.2.1 released Message-ID: <45BA8662.3010508@sschwarzer.net> ftputil 2.2.1 is now available from http://ftputil.sschwarzer.net/download . Changes since version 2.2 ------------------------- This bugfix release checks (and ignores) status code 451 when FTPFiles are closed (thanks go to Alexander Holyapin). Upgrading is recommended. What is ftputil? ---------------- ftputil is a high-level FTP client library for the Python programming language. ftputil implements a virtual file system for accessing FTP servers, that is, it can generate file-like objects for remote files. The library supports many functions similar to those in the os, os.path and shutil modules. ftputil has convenience functions for conditional uploads and downloads, and handles FTP clients and servers in different timezones. Read the documentation at http://ftputil.sschwarzer.net/trac/wiki/Documentation . License ------- ftputil is Open Source software, released under the revised BSD license (see http://www.opensource.org/licenses/bsd-license.php ). Stefan From wccppp at gmail.com Mon Jan 29 23:49:57 2007 From: wccppp at gmail.com (wccppp) Date: Mon, 29 Jan 2007 12:49:57 -1000 Subject: [ftputil] problem uploading files to ftp server Message-ID: <87bd46aa0701291449g3ffc6c6aw74cb78c6136a3e2e@mail.gmail.com> hello, first time trying our ftputil. i tried to upload files to a ftp server. everything works fine except no matter how big the original file size is, the uploaded file is only 1-2 KB. but there was no error reported. the method i used to upload file is host.upload. any idea what might be causing it? thanks a lot, -- wcc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/ftputil/attachments/20070129/077154f3/attachment.htm From sschwarzer at sschwarzer.net Tue Jan 30 18:15:54 2007 From: sschwarzer at sschwarzer.net (Stefan Schwarzer) Date: Tue, 30 Jan 2007 18:15:54 +0100 Subject: [ftputil] problem uploading files to ftp server In-Reply-To: <87bd46aa0701291449g3ffc6c6aw74cb78c6136a3e2e@mail.gmail.com> References: <87bd46aa0701291449g3ffc6c6aw74cb78c6136a3e2e@mail.gmail.com> Message-ID: <45BF7D4A.601@sschwarzer.net> Hello wcc On 2007-01-29 23:49, wccppp wrote: > first time trying our ftputil. i tried to upload files to a ftp server. > everything works fine except no matter how big the original file size is, > the uploaded file is only 1-2 KB. but there was no error reported. the > method i used to upload file is host.upload. any idea what might be causing > it? Which versions of ftputil and Python do you use? I don't have a concrete idea but some suggestions. Did you actually call the close method of the file-like object? If not, does it make a difference? It's common that network data is buffered on the client side and some part of it only transferred when the file/socket is closed. Can you transfer the files successfully with a command line or GUI FTP client from the same client computer? Can you reproduce the problem with another FTP server? (By the way, which one on which platform do you use?) How good is the network connection between client and server? Stefan From wccppp at gmail.com Tue Jan 30 20:22:27 2007 From: wccppp at gmail.com (wccppp) Date: Tue, 30 Jan 2007 09:22:27 -1000 Subject: [ftputil] problem uploading files to ftp server Message-ID: <87bd46aa0701301122t167cd0e7w1ae5f20b1881c4f5@mail.gmail.com> Stefan, Thanks for your reply. Which versions of ftputil and Python do you use? ftputil 2.2.1 (the latest) and python 2.5 I don't have a concrete idea but some suggestions. Did you actually call the close method of the file-like object? If not, does it make a difference? It's common that network data is buffered on the client side and some part of it only transferred when the file/socket is closed. do i need to close? the syntax for upload method is upload(source, target, mode) where both source and target is string, not a file object. can I call close method on them? i tried it and got an error. Can you transfer the files successfully with a command line or GUI FTP client from the same client computer? yes. i do it regularly with ftp client (FileZilla). that's why i'm trying to automate it with python. Can you reproduce the problem with another FTP server? (By the way, which one on which platform do you use?) How good is the network connection between client and server? yes. the same problem exists on two ftp servers i tried. i'm on Windows XP Pro. SP2. the internet connection is good. Btw, I could not forward the message in this mailing list to my email, so I had to start a new thread. I thought I enabled that option when I subscribed to this list, guess not. and I don't know how to change it. thanks for your help. -- wcc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/ftputil/attachments/20070130/a312ecf6/attachment-0001.htm From sschwarzer at sschwarzer.net Tue Jan 30 21:52:46 2007 From: sschwarzer at sschwarzer.net (Stefan Schwarzer) Date: Tue, 30 Jan 2007 21:52:46 +0100 Subject: [ftputil] problem uploading files to ftp server In-Reply-To: <87bd46aa0701301122t167cd0e7w1ae5f20b1881c4f5@mail.gmail.com> References: <87bd46aa0701301122t167cd0e7w1ae5f20b1881c4f5@mail.gmail.com> Message-ID: <45BFB01E.3030400@sschwarzer.net> wcc, On 2007-01-30 20:22, wccppp wrote: > Which versions of ftputil and Python do you use? > > ftputil 2.2.1 (the latest) and python 2.5 > Did you actually call the close method of the file-like object? > If not, does it make a difference? It's common that network data > is buffered on the client side and some part of it only > transferred when the file/socket is closed. > > do i need to close? the syntax for upload method is upload(source, > target, mode) where both source and target is string, not a file > object. can I call close method on them? i tried it and got an > error. oops, possibly I shouldn't reply to such emails when I'm ill. Of course, you don't have to call a close method. Internally, the upload method uses a target FTPFile which it closes at the end. > Can you transfer the files successfully with a command line or > GUI FTP client from the same client computer? > > yes. i do it regularly with ftp client (FileZilla). that's why i'm > trying to automate it with python. Ok. > Can you reproduce the problem with another FTP server? (By the > way, which one on which platform do you use?) How good is the > network connection between client and server? > > yes. the same problem exists on two ftp servers i tried. i'm on Windows XP > Pro. SP2. the internet connection is good. That's quite interesting. Could you send me an example file for which the problem actually occurs? It shouldn't be confidential, of course. ;) I'll try to reproduce the problem. The file should not be very large, so that it can be easily mailed, yet large enough to exhibit the problem. > Btw, I could not forward the message in this mailing list to my email, so I You mean, you couldn't just "reply"? Your mail client should have "reply all" (or something similar). Please use that and edit the headers. In Thunderbird, for example, you can delete the personal recipient address and change the header type before the list address to To: instead of Cc: . > had to start a new thread. I thought I enabled that option when I subscribed > to this list, guess not. and I don't know how to change it. I think there is no setting which influences whether you can send replies. Please try the tip above. Anyway, you can change your settings at http://codespeak.net/mailman/listinfo/ftputil if you log in with subscription address and your password at the bottom of the page. Stefan From metaperl.etc at gmail.com Wed Jan 31 15:19:21 2007 From: metaperl.etc at gmail.com (Terrence Brannon) Date: Wed, 31 Jan 2007 09:19:21 -0500 Subject: [ftputil] server_format / custom directory format parsing Message-ID: Per http://www.sschwarzer.net/python/ftputil.html#set-directory-format I am wondering if the support for custom directory parsers is in place. I am tackling the Connect:Enterprise UNIX FTP listing format: ftp> dir 227 Entering Passive Mode (199,125,13,20,188,78) 150 Opening ASCII mode data connection for . -CR--M----FTP B kNLeX8 5286 231 Jan 31 08:12 compile-myself Total number of batches listed: 1 226 Transfer complete. ftp> From sschwarzer at sschwarzer.net Wed Jan 31 18:36:18 2007 From: sschwarzer at sschwarzer.net (Stefan Schwarzer) Date: Wed, 31 Jan 2007 18:36:18 +0100 Subject: [ftputil] server_format / custom directory format parsing In-Reply-To: References: Message-ID: <45C0D392.5020004@sschwarzer.net> Hi Terrence, On 2007-01-31 15:19, Terrence Brannon wrote: > Per http://www.sschwarzer.net/python/ftputil.html#set-directory-format > > I am wondering if the support for custom directory parsers is in > place. Yes, it should be in-place. What makes you think it's not? :) > I am tackling the Connect:Enterprise UNIX FTP listing format: > > ftp> dir > 227 Entering Passive Mode (199,125,13,20,188,78) > 150 Opening ASCII mode data connection for . > -CR--M----FTP B kNLeX8 5286 231 Jan 31 08:12 compile-myself > Total number of batches listed: 1 > 226 Transfer complete. > ftp> You can plug in your own parser class/instance as described in the documentation. Note that you may (in your case, probably will :-) ) be able to reuse some of the convenience methods of the Parser base class. Let me know if any problems show up. If possible, we should keep this subject on the list, so it may end up as a reference for other people who need a custom parser. Stefan From sschwarzer at sschwarzer.net Wed Jan 31 18:40:55 2007 From: sschwarzer at sschwarzer.net (Stefan Schwarzer) Date: Wed, 31 Jan 2007 18:40:55 +0100 Subject: [ftputil] server_format / custom directory format parsing In-Reply-To: References: Message-ID: <45C0D4A7.7060601@sschwarzer.net> Hi Terrence, On 2007-01-31 15:19, Terrence Brannon wrote: > Per http://www.sschwarzer.net/python/ftputil.html#set-directory-format sorry, but this documentation has been out of date for quite some time. Is it still linked somewhere on my homepage at http://www.sschwarzer.net or mentioned in the ftputil documentation? Please refer to http://ftputil.sschwarzer.net/trac/wiki/Documentation#writing-directory-parsers for using the parser interface introduced in ftputil 2.2. All I wrote in my previous mail relates to this new interface. Sorry for the confusion. Stefan From sschwarzer at sschwarzer.net Wed Jan 31 23:28:53 2007 From: sschwarzer at sschwarzer.net (Stefan Schwarzer) Date: Wed, 31 Jan 2007 23:28:53 +0100 Subject: [ftputil] server_format / custom directory format parsing In-Reply-To: References: <45C0D4A7.7060601@sschwarzer.net> Message-ID: <45C11825.8010306@sschwarzer.net> Hi Terrence, On 2007-01-31 21:43, Terrence Brannon wrote: > On 1/31/07, Stefan Schwarzer wrote: >> On 2007-01-31 15:19, Terrence Brannon wrote: >>> Per http://www.sschwarzer.net/python/ftputil.html#set-directory-format >> sorry, but this documentation has been out of date for quite >> some time. Is it still linked somewhere on my homepage at >> http://www.sschwarzer.net or mentioned in the ftputil >> documentation? > > No, I usually find the ftputil docs by googling for ftputil python > and it is the #1 hit Hm, interesting. :-} I replaced the page with a page redirecting to the new URL. From my experience, Google will update its index to use the new URL, but it can take some time. Stefan From metaperl at gmail.com Wed Jan 31 21:43:10 2007 From: metaperl at gmail.com (Terrence Brannon) Date: Wed, 31 Jan 2007 15:43:10 -0500 Subject: [ftputil] server_format / custom directory format parsing In-Reply-To: <45C0D4A7.7060601@sschwarzer.net> References: <45C0D4A7.7060601@sschwarzer.net> Message-ID: On 1/31/07, Stefan Schwarzer wrote: > Hi Terrence, > > On 2007-01-31 15:19, Terrence Brannon wrote: > > Per http://www.sschwarzer.net/python/ftputil.html#set-directory-format > > sorry, but this documentation has been out of date for quite > some time. Is it still linked somewhere on my homepage at > http://www.sschwarzer.net or mentioned in the ftputil > documentation? No, I usually find the ftputil docs by googling for ftputil python and it is the #1 hit From sschwarzer at sschwarzer.net Mon Feb 5 02:54:30 2007 From: sschwarzer at sschwarzer.net (Stefan Schwarzer) Date: Mon, 05 Feb 2007 02:54:30 +0100 Subject: [ftputil] Pseudo account for tickets and wiki Message-ID: <45C68E56.3030706@sschwarzer.net> Hello, Some time ago I wrote about the spam problem at the ftputil website ( http://ftputil.sschwarzer.net ) and its effects on the issue tracker and the wiki. The recommended solution so far was to send an e-mail to me to get a personal account for the website. Meanwhile I found a simple solution that at least should prevent automatic spam bots from polluting the website. I created a general-purpose account for the issue tracker and the wiki. You can from now on log in with the user name ftputiluser and ftputil as password. This login data is also mentioned on the issue tracker information page, http://ftputil.sschwarzer.net/trac/wiki/IssueTracker . Should this approach still be abused, we have to find other ways to deal with the spam. Best wishes Stefan From sschwarzer at sschwarzer.net Wed Feb 7 02:03:50 2007 From: sschwarzer at sschwarzer.net (Stefan Schwarzer) Date: Wed, 07 Feb 2007 02:03:50 +0100 Subject: [ftputil] problem uploading files to ftp server (SOLVED) Message-ID: <45C92576.1000101@sschwarzer.net> Hello, the problem came from an inappropriate mode value for the upload method. The parameters for upload are local_file_name, remote_file_name, mode="a" That is, the mode value is optional, but it defaults to ASCII transfer though most transfers are actually better done in binary mode (mode="b"). The ASCII default is because of similarity between normal Python files and ftputil's interface. As you may remember, it was and is one of ftputil's design goals to be very similar to Python's filesystem interface (files, modules os, os.path and shutil) to make ftputil easy to learn. In most cases, however, binary mode is the best choice for the upload and download methods. On the other hand, the sizes of wcc's binary files when transferred in ASCII mode should have been either rather small (source file truncated at first ^Z) or similar in size (just 0x0a converted to 0x0d 0x0a sequences). On my Unix system, the latter is the case. On wcc's Windows system, the source file is actually truncated at the first ^Z, but the target file sizes are much larger as one would expect because of this truncation. We didn't find a reason for this even after a lot of experiments; we only found that using binary mode fixed the problem in the first place. Best wishes Stefan From lxander.m at gmail.com Wed Mar 14 20:09:04 2007 From: lxander.m at gmail.com (Alexander Michael) Date: Wed, 14 Mar 2007 15:09:04 -0400 Subject: [ftputil] FTP Through HTTP Proxy Message-ID: <525f23e80703141209s5df746f6l15a45419db2edda5@mail.gmail.com> I am hoping that someone on this list can point me in the right direction. I've been using ftputil to download files from an FTP server via an FTP proxy through a custom class derived from ftplib.FTP (to go through the proxy). Unfortunately, my company is shutting down thr FTP proxy and I am being forced to pull files through the HTTP proxy (i.e. if I type ftp://username:password at ftpserver into my browser, I can see a list of files on the server). It would be easiest to transition if I could create another ftplib.FTP subclass that goes through the HTTP proxy, but I do not know how to do this or even if it can be done. Has anyone attempted to build something like this before? From sschwarzer at sschwarzer.net Sun Mar 25 22:29:39 2007 From: sschwarzer at sschwarzer.net (Stefan Schwarzer) Date: Sun, 25 Mar 2007 22:29:39 +0200 Subject: [ftputil] FTP Through HTTP Proxy In-Reply-To: <525f23e80703141209s5df746f6l15a45419db2edda5@mail.gmail.com> References: <525f23e80703141209s5df746f6l15a45419db2edda5@mail.gmail.com> Message-ID: <4606DBB3.9060303@sschwarzer.net> Hello Alexander, On 2007-03-14 20:09, Alexander Michael wrote: > I am hoping that someone on this list can point me in the right > direction. I've been using ftputil to download files from an FTP > server via an FTP proxy through a custom class derived from ftplib.FTP > (to go through the proxy). Unfortunately, my company is shutting down > thr FTP proxy and I am being forced to pull files through the HTTP > proxy (i.e. if I type ftp://username:password at ftpserver into my > browser, I can see a list of files on the server). Since you access the path with the ftp:// protocol part prepended, there seems to be no HTTP server or proxy involved. Note that many web browsers support FTP directly, and, if I'm not mistaken, the ftp:// means that HTTP isn't used at all. Do you have any FTP proxies set in your browser configuration? If you are using a Unix-type operating system, you should also look at the ftp_proxy environment variable. I don't know what's used on Windows. I assume you can set FTP proxies with a GUI dialog or at least low-level with a registry editor. Can you directly log into the FTP server with a standalone FTP client? It may be that the company indeed shut down the FTP proxy - and you now can access the server directly. :-) Does that help? Stefan From lxander.m at gmail.com Mon Mar 26 17:04:55 2007 From: lxander.m at gmail.com (Alexander Michael) Date: Mon, 26 Mar 2007 11:04:55 -0400 Subject: [ftputil] FTP Through HTTP Proxy In-Reply-To: <4606DBB3.9060303@sschwarzer.net> References: <525f23e80703141209s5df746f6l15a45419db2edda5@mail.gmail.com> <4606DBB3.9060303@sschwarzer.net> Message-ID: <525f23e80703260804r29b991edh5114057f0d73f39b@mail.gmail.com> On 3/25/07, Stefan Schwarzer wrote: > Since you access the path with the ftp:// protocol part > prepended, there seems to be no HTTP server or proxy involved. > Note that many web browsers support FTP directly, and, if I'm not > mistaken, the ftp:// means that HTTP isn't used at all. Hmm. This would explain why I'm not convinced of my own analysis of the situation, but yet, I remain uncertain. > Do you have any FTP proxies set in your browser configuration? Yes. I set the HTTP proxy (the usual host "proxy" on port "8080") and checked "Use this proxy server for all protocols." > If you are using a Unix-type operating system, you should also > look at the ftp_proxy environment variable. I futzed with this, but couldn't get it to work. I'm working on both linux and Windows, but testing on linux. The linux FTP client doesn't seem to use FTP_PROXY, and I can't ftp into the HTTP proxy server. > Can you directly log into the FTP server with a standalone FTP > client? It may be that the company indeed shut down the FTP proxy - > and you now can access the server directly. :-) I used to be able to do this. :) > Does that help? Yes, it does. I am operating outside my realm of expertise (if indeed I have such a realm) and these are good questions to ask myself as I work to solve this issue. Thank you for responding. Here's what I've been able to make work outside of Firefox (I cobbled this together from some Google searches): import urllib2 ph = urllib2.ProxyHandler( {'ftp':'http://proxy_username:proxy_password at proxy:8080'}) passmgr = urllib2.HTTPPasswordMgrWithDefaultRealm() passmgr.add_password(None, 'http://proxy:8080', 'proxy_username', 'proxy_password') au = urllib2.ProxyBasicAuthHandler(passmgr) opener = urllib2.build_opener(ph, au) index_fobj = opener.open( 'ftp://ftp_username:ftp_password at ftpserver') print index_fobj.read() # print an html-ized dir list data_fobj = opener.open( 'ftp://ftp_username:ftp_password at ftpserver/remote_file.dat') open('remote_file.dat', 'wb').write( data_fobj.read()) # get file from ftp server From sschwarzer at sschwarzer.net Mon Mar 26 18:07:12 2007 From: sschwarzer at sschwarzer.net (Stefan Schwarzer) Date: Mon, 26 Mar 2007 18:07:12 +0200 Subject: [ftputil] FTP Through HTTP Proxy In-Reply-To: <525f23e80703260804r29b991edh5114057f0d73f39b@mail.gmail.com> References: <525f23e80703141209s5df746f6l15a45419db2edda5@mail.gmail.com> <4606DBB3.9060303@sschwarzer.net> <525f23e80703260804r29b991edh5114057f0d73f39b@mail.gmail.com> Message-ID: <4607EFB0.8060207@sschwarzer.net> Hi Alexander, On 2007-03-26 17:04, Alexander Michael wrote: > On 3/25/07, Stefan Schwarzer wrote: >> Do you have any FTP proxies set in your browser configuration? > > Yes. I set the HTTP proxy (the usual host "proxy" on port "8080") and > checked "Use this proxy server for all protocols." The HTTP proxy and FTP proxy are independent on each other (with the exception that the provider may use the same host for both proxies, but also then you can treat the proxies as independent). So if you use the ftp:// protocol, the HTTP proxy shouldn't matter at all. >> If you are using a Unix-type operating system, you should also >> look at the ftp_proxy environment variable. > > I futzed with this, but couldn't get it to work. I'm working on both > linux and Windows, but testing on linux. The linux FTP client doesn't > seem to use FTP_PROXY, and I can't ftp into the HTTP proxy server. To my surprise, the environment variable is usually ftp_proxy (lowercase) though generally environment variables are all uppercase. Please try the lowercase va >> Can you directly log into the FTP server with a standalone FTP >> client? It may be that the company indeed shut down the FTP proxy - >> and you now can access the server directly. :-) > > I used to be able to do this. :) And ... now, without any proxy settings? :-) >> Does that help? > > Yes, it does. I am operating outside my realm of expertise (if indeed > I have such a realm) and these are good questions to ask myself as I > work to solve this issue. Thank you for responding. > > Here's what I've been able to make work outside of Firefox (I cobbled > this together from some Google searches): > > import urllib2 [...] You shouldn't use complicated code unless you are sure you need it. :-) I suggest to try the direct login first if you haven't already done so. Stefan From lxander.m at gmail.com Tue Mar 27 16:33:54 2007 From: lxander.m at gmail.com (Alexander Michael) Date: Tue, 27 Mar 2007 10:33:54 -0400 Subject: [ftputil] FTP Through HTTP Proxy In-Reply-To: <4607EFB0.8060207@sschwarzer.net> References: <525f23e80703141209s5df746f6l15a45419db2edda5@mail.gmail.com> <4606DBB3.9060303@sschwarzer.net> <525f23e80703260804r29b991edh5114057f0d73f39b@mail.gmail.com> <4607EFB0.8060207@sschwarzer.net> Message-ID: <525f23e80703270733x575f122q5c63f005742e9d57@mail.gmail.com> On 3/26/07, Stefan Schwarzer wrote: > The HTTP proxy and FTP proxy are independent [of] each other (with > the exception that the provider may use the same host for both > proxies, but also then you can treat the proxies as independent). > So if you use the ftp:// protocol, the HTTP proxy shouldn't > matter at all. Actually, that's just it, they're not independent. With a little more digging with Google, I've discovered that this mechanism for accessing a remote FTP site over an HTTP proxy is called "FTP-over-HTTP" or sometimes simply HFTP. Apparently, RFC 2616 (HTTP/1.1) accommodates this mechanism for proxies and gateways with the Host header field. When typing the "ftp" URL in Firefox configured to use a proxy, Firefox actually sends the request via HTTP to the HTTP proxy server and the proxy server acts as the FTP client with the remote FTP server. The HTTP proxy then responds to the web browser via HTTP with contents of the FTP URL. > To my surprise, the environment variable is usually ftp_proxy > (lowercase) though generally environment variables are all > uppercase. Please try the lowercase va Well, the curl man page listed it in upper case, but this is a moot point for my issue now that I understand it. > You shouldn't use complicated code unless you are sure you need > it. :-) I suggest to try the direct login first if you haven't > already done so. Yeah. I was hoping to avoid this, but it has become clear to me what is going on, and that I am forced to go this circuitous route. I really appreciate the sanity checking here. Thanks for your help! Alex P.S. And yes, I am absolutely certain that our firewall is functioning and that I must go through the proxy. From sschwarzer at sschwarzer.net Tue Mar 27 18:25:51 2007 From: sschwarzer at sschwarzer.net (Stefan Schwarzer) Date: Tue, 27 Mar 2007 18:25:51 +0200 Subject: [ftputil] FTP Through HTTP Proxy In-Reply-To: <525f23e80703270733x575f122q5c63f005742e9d57@mail.gmail.com> References: <525f23e80703141209s5df746f6l15a45419db2edda5@mail.gmail.com> <4606DBB3.9060303@sschwarzer.net> <525f23e80703260804r29b991edh5114057f0d73f39b@mail.gmail.com> <4607EFB0.8060207@sschwarzer.net> <525f23e80703270733x575f122q5c63f005742e9d57@mail.gmail.com> Message-ID: <4609458F.9070201@sschwarzer.net> Hi Alexander, On 2007-03-27 16:33, Alexander Michael wrote: > On 3/26/07, Stefan Schwarzer wrote: >> The HTTP proxy and FTP proxy are independent [of] each other (with >> the exception that the provider may use the same host for both >> proxies, but also then you can treat the proxies as independent). >> So if you use the ftp:// protocol, the HTTP proxy shouldn't >> matter at all. > > Actually, that's just it, they're not independent. With a little more > digging with Google, I've discovered that this mechanism for accessing > a remote FTP site over an HTTP proxy is called "FTP-over-HTTP" or > sometimes simply HFTP. Apparently, RFC 2616 (HTTP/1.1) accommodates > this mechanism for proxies and gateways with the Host header field. > When typing the "ftp" URL in Firefox configured to use a proxy, > Firefox actually sends the request via HTTP to the HTTP proxy server > and the proxy server acts as the FTP client with the remote FTP > server. The HTTP proxy then responds to the web browser via HTTP with > contents of the FTP URL. Funny, I didn't think of something like that. There's always something to learn. :) >> To my surprise, the environment variable is usually ftp_proxy >> (lowercase) though generally environment variables are all >> uppercase. Please try the lowercase va > > Well, the curl man page listed it in upper case, but this is a moot > point for my issue now that I understand it. I've seen both spellings, but in recent years only(?) the lowercase variant. >> You shouldn't use complicated code unless you are sure you need >> it. :-) I suggest to try the direct login first if you haven't >> already done so. > > Yeah. I was hoping to avoid this, but it has become clear to me what > is going on, and that I am forced to go this circuitous route. Good luck! :-) Would you mind to post the code you ended up with? Stefan