Hi All,
Apologies for the length of this email but I wanted to include all the
information I thought would be needed.
I'm fairly new to wget so its possible I'm doing something wrong here,
but having read the docs etc I still can't get this to work as I think
it ought to.
I have to access the net via a proxy as I am behind a firewall here at
work. I have an account on another machine externally and I often ftp
stuff from this machine to work.
I have my .wgetrc file as follows:
----------------- .wgetrc file follows ---------------
# Allow continuation of d/l
continue=on
#
# Set The FTP proxy
ftp_proxy=http://proxy.simoco.com:880/
#
# Set the HTTP proxy
http_proxy=http://proxy.simoco.com:880/
#
# Set the FTP login name
login=anonymous
#
# Enable no clobbering
#noclobber=on
#
# no proxy for
no_proxy=serv13,serv13.simoco.com
#
# Set the login FTP passwd
[EMAIL PROTECTED]
#
# Set the Proxy username
proxy_user=myproxyaccount
#
# Proxy passwd
proxy_passwd=myproxypassword
#
# Print server responses
server_response=on
#
# Use the proxy
use_proxy=on
----------------- end of .wgetrc file ---------------
I also have a .netrc file as follows:
----------------- .netrc file follows ---------------
machine a.machine.com login rick password thisismypassword
<snip several more entries>
----------------- end of .netrc file ---------------
Here are 3 attempts to retrieve a file from the remote machine. I added
some extra debug in netrc.c at the start of search_netrc to print the
host out as follows:
DEBUGP(("SEARCH_NETRC: host:%s\n",host));
and in each case it reports that it is looking for the proxy machine!?
Shouldn't *all* of them work and if not why not?
====== Attempt 1:
---> FAILS
serv13(599): wget -d ftp:[EMAIL PROTECTED]/dl/a.a
DEBUG output created by Wget 1.7 on solaris2.6.
parseurl ("ftp:[EMAIL PROTECTED]/dl/a.a") -> host a.machine.com -> ftp_type I ->
opath dl/a.a -> dir dl -> file a.a -> ndir dl
newpath: /dl/a.a
parseurl ("http://proxy.simoco.com:880/") -> host proxy.simoco.com -> port 880 ->
opath -> dir -> file -> ndir
newpath: /
--17:01:49-- ftp:[EMAIL PROTECTED]/dl/a.a
=> `a.a'
Connecting to proxy.simoco.com:880... Caching proxy.simoco.com <-> 193.150.150.3
Created fd 4.
connected!
SEARCH_NETRC: host:proxy.simoco.com
---request begin---
GET ftp:[EMAIL PROTECTED]/dl/a.a HTTP/1.0
User-Agent: Wget/1.7
Host: a.machine.com:21
Accept: */*
Proxy-Authorization: Basic BASE64PROXYUSERPASS
---request end---
Proxy request sent, awaiting response... HTTP/1.0 401 Unauthorized
Server: Squid/2.2.STABLE3
2 Server: Squid/2.2.STABLE3Mime-Version: 1.0
3 Mime-Version: 1.0Date: Thu, 07 Jun 2001 15:31:01 GMT
4 Date: Thu, 07 Jun 2001 15:31:01 GMTContent-Type: text/html
5 Content-Type: text/htmlContent-Length: 707
6 Content-Length: 707Expires: Thu, 07 Jun 2001 15:31:01 GMT
7 Expires: Thu, 07 Jun 2001 15:31:01 GMTX-Squid-Error: ERR_ACCESS_DENIED 0
8 X-Squid-Error: ERR_ACCESS_DENIED 0WWW-Authenticate: Basic realm="ftp rick"
9 WWW-Authenticate: Basic realm="ftp rick"X-Cache: MISS from ukcamnet01
10 X-Cache: MISS from ukcamnet01Proxy-Connection: close
11 Proxy-Connection: close
12
Closing fd 4
Authorization failed.
====== Attempt 2:
---> FAILS
serv13(600): wget -d ftp://a.machine.com/dl/a.a
DEBUG output created by Wget 1.7 on solaris2.6.
parseurl ("ftp://a.machine.com/dl/a.a") -> host a.machine.com -> ftp_type I -> opath
dl/a.a -> dir dl -> file a.a -> ndir dl
newpath: /dl/a.a
parseurl ("http://proxy.simoco.com:880/") -> host proxy.simoco.com -> port 880 ->
opath -> dir -> file -> ndir
newpath: /
--17:10:59-- ftp://a.machine.com/dl/a.a
=> `a.a'
Connecting to proxy.simoco.com:880... Caching proxy.simoco.com <-> 193.150.150.3
Created fd 4.
connected!
SEARCH_NETRC: host:proxy.simoco.com
---request begin---
GET ftp://a.machine.com/dl/a.a HTTP/1.0
User-Agent: Wget/1.7
Host: a.machine.com:21
Accept: */*
Proxy-Authorization: Basic BASE64PROXYUSERPASS
---request end---
Proxy request sent, awaiting response... HTTP/1.0 404 Not Found
Server: Squid/2.2.STABLE3
2 Server: Squid/2.2.STABLE3Mime-Version: 1.0
3 Mime-Version: 1.0Date: Thu, 07 Jun 2001 15:40:14 GMT
4 Date: Thu, 07 Jun 2001 15:40:14 GMTContent-Type: text/html
5 Content-Type: text/htmlContent-Length: 964
6 Content-Length: 964Expires: Thu, 07 Jun 2001 15:40:14 GMT
7 Expires: Thu, 07 Jun 2001 15:40:14 GMTX-Squid-Error: ERR_FTP_NOT_FOUND 0
8 X-Squid-Error: ERR_FTP_NOT_FOUND 0X-Cache: MISS from ukcamnet01
9 X-Cache: MISS from ukcamnet01Proxy-Connection: close
10 Proxy-Connection: close
11
Closing fd 4
17:11:02 ERROR 404: Not Found.
====== Attempt 3:
--> SUCCESS!!
serv13(601): wget -d ftp://rick:[EMAIL PROTECTED]/dl/a.a
DEBUG output created by Wget 1.7 on solaris2.6.
parseurl ("ftp://rick:[EMAIL PROTECTED]/dl/a.a") -> host a.machine.com ->
ftp_type I -> opath dl/a.a -> dir dl -> file a.a -> ndir dl
newpath: /dl/a.a
parseurl ("http://proxy.simoco.com:880/") -> host proxy.simoco.com -> port 880 ->
opath -> dir -> file -> ndir
newpath: /
--17:11:41-- ftp://rick:<password>@a.machine.com/dl/a.a
=> `a.a'
Connecting to proxy.simoco.com:880... Caching proxy.simoco.com <-> 193.150.150.3
Created fd 4.
connected!
SEARCH_NETRC: host:proxy.simoco.com <<--*** Why is it looking for proxy?
---request begin---
GET ftp://rick:[EMAIL PROTECTED]/dl/a.a HTTP/1.0
User-Agent: Wget/1.7
Host: a.machine.com:21
Accept: */*
Authorization: Basic BASE64ENCODEDSTRING
Proxy-Authorization: Basic BASE64PROXYUSERPASS
---request end---
Proxy request sent, awaiting response... HTTP/1.0 200 OK
Server: Squid/2.2.STABLE3
2 Server: Squid/2.2.STABLE3Mime-Version: 1.0
3 Mime-Version: 1.0Date: Thu, 07 Jun 2001 15:40:54 GMT
4 Date: Thu, 07 Jun 2001 15:40:54 GMTContent-Type: text/plain
5 Content-Type: text/plainContent-Length: 22
6 Content-Length: 22Last-Modified: Fri, 06 Apr 2001 08:06:08 GMT
7 Last-Modified: Fri, 06 Apr 2001 08:06:08 GMTX-Cache: MISS from ukcamnet01
8 X-Cache: MISS from ukcamnet01Proxy-Connection: close
9 Proxy-Connection: close
10
0K 100% @ 21.48 KB/s
Closing fd 4
17:11:43 (21.48 KB/s) - `a.a' saved [22/22]
====== END =======
Can anyone explain what's going on here and why please?
Thanks.
--
Richard Travett, Email: [EMAIL PROTECTED]
May all your communications be free from electro-magnetic disturbances,
and your days be free from temporal distortions in the space time continuum
This email does not represent a formal communication from Simoco.