【问题标题】:Why does curl allow use of the file URL scheme, but not wget为什么 curl 允许使用文件 URL 方案,但不允许使用 wget
【发布时间】:2012-05-13 12:49:45
【问题描述】:

这个问题是指 curl 7.21.4 和 GNU Wget 1.13.4,我不知道答案是否特定于版本。

使用file URI scheme 我可以使用curl 获取本地文件

$ curl file://localhost/Users/dave/.vimrc
contents of .vimrc

但是,如果我使用 wget 尝试相同的操作,我会收到错误:

$ wget file://localhost/Users/dave/.vimrc
file://localhost/Users/dave/.vimrc: Unsupported scheme `file'

有人知道为什么会这样吗?

【问题讨论】:

    标签: curl wget file-uri


    【解决方案1】:

    因为尚未编写 Wget 以支持 file:// URL。 (front web page 明确指出“GNU Wget 是一个使用 HTTP、HTTPS 和 FTP 检索文件的免费软件包”)

    请允许我指点一下curl vs wget comparison

    【讨论】:

      【解决方案2】:

      wget 仅支持 HTTP、HTTPS 和 FTP 协议。

      【讨论】:

      • 你能提供一个引用,或者为什么会这样吗?
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-07-18
      • 2014-08-23
      • 2013-05-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-18
      相关资源
      最近更新 更多