我尝试使用批处理文件与WGET从这里WGET 401未授权
http://wireless.fcc.gov/uls/data/complete/l_micro.zip
下载公开FCC文件中当我intially运行带参数的批处理文件
wget --server-response -owget.log http://wireless.fcc.gov/uls/data/complete/l_micro.zip
它会因HTTP 401未经授权的错误而失败。我可以在这一点重试,并且一直失败。不过,我注意到如果我打开IE浏览器,开始下载并在提示保存时取消,我可以重新运行批处理文件,并且它可以完美执行!
下面是从日志
--2012-02-06 14:32:24-- http://wireless.fcc.gov/uls/data/complete/l_micro.zip
Resolving wireless.fcc.gov (wireless.fcc.gov)... 192.104.54.158
Connecting to wireless.fcc.gov (wireless.fcc.gov)|192.104.54.158|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 302 Found
Location: REMOVED - appears to have my IP
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=utf-8
Connection: close
Content-Length: 513
Location: REMOVED [following]
--2012-02-06 14:32:24-- REMOVED
Resolving REMOVED... 192.168.2.11
Connecting to REMOVED|192.168.2.11|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 401 Unauthorized
Cache-Control: no-cache
Pragma: no-cache
WWW-Authenticate: NTLM
WWW-Authenticate: BASIC realm="AD_BCAAA"
Content-Type: text/html; charset=utf-8
Proxy-Connection: close
Set-Cookie: BCSI-CS-8ECFB6B4AA642EF0=2; Path=/
Connection: close
Content-Length: 575
Authorization failed.
我详细的服务器响应下面是日志做我的小IE程序,并得到后它的工作
--2012-02-08 15:52:43-- http://wireless.fcc.gov/uls/data/complete/l_micro.zip
Resolving wireless.fcc.gov (wireless.fcc.gov)... 192.104.54.158
Connecting to wireless.fcc.gov (wireless.fcc.gov)|192.104.54.158|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Server: Sun-Java-System-Web-Server/7.0
Date: Fri, 27 Jan 2012 18:37:51 GMT
Content-type: application/zip
Last-modified: Sun, 22 Jan 2012 11:18:09 GMT
Etag: "46fa95c-4f1bf071"
Accept-ranges: bytes
Content-length: 74426716
Connection: Keep-Alive
Age: 1045014
Length: 74426716 (71M) [application/zip]
Saving to: `l_micro.zip'
任何帮助表示赞赏!
你的命令对我来说是完美无缺的...... – jglouie 2012-02-08 21:10:44
我尝试了'wget http:// wireless.fcc.gov/uls/data/complete/l_micro.zip',并得到了'74693506'的文件'l_micro.zip'字节与sha1sum的'1f8393bf6231bfa9689ec91cab6a660244f35605'。 – 2012-02-08 21:13:40
您的网络上是否有透明代理?你可以在你的IE会话中运行wireshark或fiddler来看看它有什么不同吗? – 2012-02-09 17:56:39