SSH Quick Install: incorrect or header missing
z opened this issue · comments
When reviewing the 'SSH Quick Install' instructions here: http://docs.mybb.com/1.8/install/ I ran across an issue running wget
and curl
I believe it may be due to a missing header on the server.
z@zap:~ % wget --content-disposition https://www.mybb.com/download/latest -O mybb.zip
--2016-07-06 22:16:16-- https://www.mybb.com/download/latest
Resolving www.mybb.com (www.mybb.com)... 104.24.8.55, 104.24.9.55, 2400:cb00:2048:1::6818:937, ...
Connecting to www.mybb.com (www.mybb.com)|104.24.8.55|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.mybb.com/download/latest/ [following]
--2016-07-06 22:16:16-- http://www.mybb.com/download/latest/
Connecting to www.mybb.com (www.mybb.com)|104.24.8.55|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘mybb.zip’
[ <=> ] 503 --.-K/s in 0s
2016-07-06 22:16:16 (158 MB/s) - ‘mybb.zip’ saved [503]
z@zap:~ % unzip mybb.zip
Archive: mybb.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of mybb.zip or
mybb.zip.zip, and cannot find mybb.zip.ZIP, period.
Outputting the contents of the file, I see HTML:
z@zap:~ % cat mybb.zip
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<meta http-equiv="refresh" content="0; url=https://resources.mybb.com/downloads/mybb_1807.zip">
<link rel="canonical" href="https://resources.mybb.com/downloads/mybb_1807.zip" />
<title>Redirecting</title>
</head>
<body>
</body>
</html>%
Referencing the wget man page for the flag:
--content-disposition
If this is set to on, experimental (not fully-functional) support for "Content-Disposition" headers is enabled. This can currently result in extra round-trips to the server for a "HEAD" request, and is known to suffer from a few bugs, which is why it is not currently enabled by
default.
This option is useful for some file-downloading CGI programs that use "Content-Disposition" headers to describe what the name of a downloaded file should be.
Cross reference the response headers:
z@zap:~ % curl -I https://www.mybb.com/download/latest |grep -i "content-disposition"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Content-Disposition
does not appear to be present, which could be the cause of downloading HTML using wget
or curl
.
Yeah. This is a result of moving the site from being self-hosted (way back when) to GitHub Pages.
I guess we could update it at each release to point directly to the ZIP file on resources.mybb.com.