【发布时间】:2020-08-12 08:22:21
【问题描述】:
我一直在使用 WGET 下载以下文件:
wget http://www.fsnradionews.com/FSNNews/FSNHeadlines.mp3
这很好用,但我想用 CURL 做同样的事情。如果我使用:
curl -L -O http://www.fsnradionews.com/FSNNews/FSNHeadlines.mp3
..文件下载但不是音频文件,它包含以下 HTML:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>406 Not Acceptable</title>
</head><body>
<h1>Not Acceptable</h1>
<p>An appropriate representation of the requested resource could not be found on this server.</p>
<p>Additionally, a 406 Not Acceptable
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
在研究了这个问题后,许多人建议请求被重定向,因此我添加了 -L,但这似乎并不能解决问题。
有什么建议吗?
【问题讨论】: