小编use*_*537的帖子

WGET 401未经授权

我正在尝试使用WGET批处理文件从这里下载公共FCC文件

http://wireless.fcc.gov/uls/data/complete/l_micro.zip

当我最初使用参数运行批处理文件时

wget --server-response -owget.log http://wireless.fcc.gov/uls/data/complete/l_micro.zip 
Run Code Online (Sandbox Code Playgroud)

它因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: …
Run Code Online (Sandbox Code Playgroud)

http wget unauthorized http-status-code-401

12
推荐指数
5
解决办法
7万
查看次数

标签 统计

http ×1

http-status-code-401 ×1

unauthorized ×1

wget ×1