Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update start.sh #95

Merged
merged 2 commits into from
Jul 3, 2021
Merged

Update start.sh #95

merged 2 commits into from
Jul 3, 2021

Conversation

titiscan
Copy link
Contributor

@titiscan titiscan commented Jul 2, 2021

Access Denied while downloading update

Access Denied while downloading update
@TheRemote
Copy link
Owner

This is really interesting. It seems like maybe the downloads folder had the wrong permissions, or maybe just the version.html file itself.

I haven't got this behavior but it looks really interesting what you're doing. You seem to be downloading a gzipped version of the page. Can you explain a little bit more?

@titiscan
Copy link
Contributor Author

titiscan commented Jul 2, 2021

Hi, when I tried to download the index.html from Minecraft server with curl (even in root), I got the file but it does not contain any information about server's version.

<H1>Access Denied</H1>
 
You don't have permission to access "http&#58;&#47;&#47;www&#46;minecraft&#46;net&#47;en&#45;us&#47;download&#47;server&#47;bedrock" on this server.<P>
Reference&#32;&#35;18&#46;5ed7b5c&#46;1625267927&#46;2390560

Adding headers is the way I've found to get the correct file

Regards

Ps: on Ubuntu 20.04

@TheRemote
Copy link
Owner

TheRemote commented Jul 2, 2021

Curious, can you make sure you have the latest version? The latest one should be using the -L flag which should take care of the location headers but maybe there's something else going on here! Can you verify your start.sh (and SetupMinecraft.sh) is up to date here? I'd like to continue to investigate this just to understand why it's happening (and not to everyone)!

I've done like 20 upgrades today as well so I want to make sure we're on the same page here before we dive in deeper!

@titiscan
Copy link
Contributor Author

titiscan commented Jul 3, 2021

Thanks for your time, I just try in console (bash) from user and root the curl command :

curl -L -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.1234.212 Safari/537.36" -o test.html https://www.minecraft.net/en-us/download/server/bedrock

And the result (cat test.html)

<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
 
You don't have permission to access "http&#58;&#47;&#47;www&#46;minecraft&#46;net&#47;en&#45;us&#47;download&#47;server&#47;bedrock" on this server.<P>
Reference&#32;&#35;18&#46;4ed7b5c&#46;1625311242&#46;c2027da
</BODY>
</HTML>

@TheRemote
Copy link
Owner

TheRemote commented Jul 3, 2021

Thanks for that, I am wondering if it's the:

-H "Accept-Language: en"

Is your computer's default language not English by chance? You're still the only one that has reported this and I'm trying to figure out what's "special" about yours! It doesn't make a lot of sense that it would serve you the gzipped version of the exact same content, but you're clearly getting access denied without these headers which is why I was wondering if maybe that's what is different from most people's setups!

I just uploaded a version that adds the language headers as a test if you'd like to try it as well!

@titiscan
Copy link
Contributor Author

titiscan commented Jul 3, 2021

Sorry I don't know what is special about my configuration. My locale is set to "en_US.UTF-8".

Adding only the Accept-Language doesn't change the result but you made me think of something.

When I tried to make it work I just copied all headers from my regular browser and searched which was necessary. So I tried to change the "Accept-Encoding" header to "identity" and it works without compression

-H "Accept-Encoding: identity"

Regards

@TheRemote
Copy link
Owner

TheRemote commented Jul 3, 2021

Fantastic find, wow! I honestly have not encountered this issue before but I was able to find this:

(whatwg/fetch#747)

Although this specific bug is not specific to what we're talking about here they did discuss that some servers seem to be configured to expect this header. The only part I don't understand is why don't I have to have it (or almost everyone else).

May I ask which distro and version this is? That may help shed some light on this. I'll for sure upload this change!

@TheRemote TheRemote merged commit 4d2afc1 into TheRemote:master Jul 3, 2021
@titiscan
Copy link
Contributor Author

titiscan commented Jul 4, 2021

I'm on Ubuntu 20.04 (vps from a French provider)

And curl version is

# curl -V
curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Release-Date: 2020-01-08
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants