summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog4
-rw-r--r--doc/sources.list.5.yo6
-rw-r--r--methods/ftp.cc24
3 files changed, 30 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index 4bfe44249..79c6d6c2d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,7 +11,9 @@ apt (0.3.6.1) unstable; urgency=low
* Added a check for an empty cache directory. Closes: #37963
* Return a failure code if -d is given and packages fail to download.
Closes: #38127
-
+ * Arranged for an ftp proxy specifing an http server to work. See the
+ important note in the sources.list man page.
+
-- Jason Gunthorpe <jgg@debian.org> Wed, 12 May 1999 09:18:49 -0700
apt (0.3.6) unstable; urgency=low
diff --git a/doc/sources.list.5.yo b/doc/sources.list.5.yo
index e468ce3d4..605f46c50 100644
--- a/doc/sources.list.5.yo
+++ b/doc/sources.list.5.yo
@@ -86,7 +86,11 @@ Note that this is an insecure method of authentication.
dit(bf(ftp))
The ftp scheme specifies an FTP server for the archive. APT's FTP behavior
is highly configurable; for more information see the
-bf(apt.conf(5)) manual page.
+bf(apt.conf(5)) manual page. Please note that a ftp proxy can be specified
+by using the ftp_proxy environment variable. It is possible to specify a http
+proxy (http proxy servers often understand ftp urls) using this method and
+ONLY this method. ftp proxies using http specified in the configuration
+file will be ignored.
dit(bf(copy))
The copy scheme is identical to the file scheme except that packages are
diff --git a/methods/ftp.cc b/methods/ftp.cc
index d72a44ea3..4686e79f8 100644
--- a/methods/ftp.cc
+++ b/methods/ftp.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: ftp.cc,v 1.7 1999/04/17 23:18:11 jgg Exp $
+// $Id: ftp.cc,v 1.8 1999/05/23 06:33:13 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the FTP aquire method for APT.
@@ -910,8 +910,28 @@ bool FtpMethod::Fetch(FetchItem *Itm)
}
/*}}}*/
-int main()
+int main(int argc,const char *argv[])
{
+ /* See if we should be come the http client - we do this for http
+ proxy urls */
+ if (getenv("ftp_proxy") != 0)
+ {
+ URI Proxy = string(getenv("ftp_proxy"));
+ if (Proxy.Access == "http")
+ {
+ // Copy over the environment setting
+ char S[300];
+ snprintf(S,sizeof(S),"http_proxy=%s",getenv("ftp_proxy"));
+ putenv(S);
+
+ // Run the http method
+ string Path = flNotFile(argv[0]) + "/http";
+ execl(Path.c_str(),Path.c_str());
+ cerr << "Unable to invoke " << Path << endl;
+ exit(100);
+ }
+ }
+
FtpMethod Mth;
return Mth.Run();