![无法在 Dropbox 上下载文件 400 错误请求](https://linux22.com/image/169182/%E6%97%A0%E6%B3%95%E5%9C%A8%20Dropbox%20%E4%B8%8A%E4%B8%8B%E8%BD%BD%E6%96%87%E4%BB%B6%20400%20%E9%94%99%E8%AF%AF%E8%AF%B7%E6%B1%82.png)
指导
https://tracker.ceph.com/projects/ceph/wiki/Ceph_Vagrant_Setup
$ wget https://www.dropbox.com/s/hn28qgjn59nud6h/ceph-all-in-one.box
--2020-03-14 12:11:09-- https://www.dropbox.com/s/hn28qgjn59nud6h/ceph-all-in-one.box
Resolving www.dropbox.com (www.dropbox.com)... 162.125.80.1
Connecting to www.dropbox.com (www.dropbox.com)|162.125.80.1|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: /s/raw/hn28qgjn59nud6h/ceph-all-in-one.box [following]
--2020-03-14 12:11:10-- https://www.dropbox.com/s/raw/hn28qgjn59nud6h/ceph-all-in-one.box
Reusing existing connection to www.dropbox.com:443.
HTTP request sent, awaiting response... 400 Bad Request
2020-03-14 12:11:10 ERROR 400: Bad Request.
文件已过期?
答案1
尝试使用网络浏览器访问https://www.dropbox.com/s/hn28qgjn59nud6h/ceph-all-in-one.box
– Dropbox 显示一条消息:
404 我们找不到您要查找的内容。
(虽然显示消息确实需要 javascript...)
通过以下方式请求页面curl
:
$ curl -IL 'https://www.dropbox.com/s/hn28qgjn59nud6h/ceph-all-in-one.box'
HTTP/2 301
...
location: /s/raw/hn28qgjn59nud6h/ceph-all-in-one.box
...
HTTP/2 400
使用不同的User-Agent
标题:
$ curl -A cruel -IL 'https://www.dropbox.com/s/hn28qgjn59nud6h/ceph-all-in-one.box'
HTTP/2 200
...
$ curl -s -A cruel 'https://www.dropbox.com/s/hn28qgjn59nud6h/ceph-all-in-one.box' |
> grep -om1 '<title>[^<]*'
<title>Dropbox - Error