为什么 wget 无法从该服务器下载?

为什么 wget 无法从该服务器下载?
  • 使用win10
  • 可以使用 IDM 和 chrome 下载链接

我收到此错误。有什么问题吗?

C:\Users\alihani>cd C:\wget-1.19.1-win64

C:\wget-1.19.1-win64>wget http://rgwha1.elcld.com/Public/1996747932?AWSAccessKeyId=ZTCEWB8UCH1HR47ZQJYT&Expires=1510149040&response-cache-control=public%2C%20max-age%3D2592000&response-content-disposition=attachment%3B%20filename%3D%22%27Til%20Death%20Season%201.rar%22&response-content-encoding=System.Text.UTF8Encoding&response-content-type=application%2Foctet-stream&Signature=FYX3YEWDXD%2Bfd5X98fzrQEjZ1vw%3D

--2017-10-09 16:52:07--  http://rgwha1.elcld.com/Public/1996747932?AWSAccessKeyId=ZTCEWB8UCH1HR47ZQJYT
Resolving rgwha1.elcld.com (rgwha1.elcld.com)... 192.168.222.216
Connecting to rgwha1.elcld.com (rgwha1.elcld.com)|192.168.222.216|:80... connected.

HTTP request sent, awaiting response... 400 Bad Request
2017-10-09 16:52:08 ERROR 400: Bad Request.

'Expires' is not recognized as an internal or external command,
operable program or batch file.

'response-cache-control' is not recognized as an internal or external command,
operable program or batch file.

'response-content-disposition' is not recognized as an internal or external command,
operable program or batch file.

'response-content-encoding' is not recognized as an internal or external command,
operable program or batch file.

'response-content-type' is not recognized as an internal or external command,
operable program or batch file.

'Signature' is not recognized as an internal or external command,
operable program or batch file.

答案1

&用于分隔 Windows shell 中的命令。使用你的命令,你将执行以下内容:

C:\wget-1.19.1-win64> wget http://rgwha1.elcld.com/Public/1996747932?AWSAccessKeyId=ZTCEWB8UCH1HR47ZQJYT
C:\wget-1.19.1-win64> Expires=1510149040
C:\wget-1.19.1-win64> response-cache-control=public%2C%20max-age%3D2592000
[...]
  • 您的链接被截断,导致请求无效(因此出现错误代码 400 - 错误请求)
  • 你的 shell 不知道Expiresresponse-cache-control、 等等 是什么意思。

尝试转义 URL,以便 shell 将其识别&为 URL 的一部分而不是分隔符。

相关内容