mybb / mybb/docs.mybb.com

SSH Quick Install: incorrect or header missing

Open
#92 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
27
Forks
76
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SSH Quick Install instructions at http://docs.mybb.com/1.8/install/ and reproduce the wget and curl requests shown in the issue. Determine whether the documentation or the download endpoint needs changing; done means the documented command retrieves the MyBB archive rather than an HTML redirect page.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.