无法在 Dropbox 上下载文件 400 错误请求

无法在 Dropbox 上下载文件 400 错误请求

指导

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

相关内容