Wget
無法在 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.
文件過期了?
嘗試使用網路瀏覽器訪問
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