It is unadvised to have your login and password in the link. As far as I know and am concerned, The link is sent to the client and then downloaded from there. Through that, someone may look in the logs/console of the client and figure out the source of the download. Most may not notice but those that monitor traffic through a personal firewall may have that flagged out as suspicious and thus revealing that link.
It is advised to upload the texturepack elsewhere such is on dropbox or some other public hosting site where the user can download without compromising your server security.
The user MorkPork had a similar issue in another question. He had the same error while trying to use a url contained in a string in java. Another user m-szalik, responded with this answer:
You need to encode your parameter's values before concatenating them to a URL...
In another question, good asked which characters are not valid in a url. User Gumbo responded saying that the characters []@!$&'()*+,;=
are all invalid. As m-szalik said, you must encode them. In the url you gave the only invalid character was =
. I already encoded the equals symbol for you using a Url encoding site. The result was %3D
. Once we replace the equals sign with the encoded equals sign, the result is:
https://www.dropbox.com/s/4nbkkrfmxkw6n82/DefaultHDv1_7.zip?dl%3D1
If you click that URL it works just the same as the old url.
Note: If that url does not work either you can also try encoding the entire url, which would result in http%3A%2F%2Fwww.dropbox.com%2Fs%2F4nbkkrfmxkw6n82%2FDefaultHDv1_7.zip%3Fdl%3D1
, which is also a working Url.
I hope this helped.
Tip:
In a url a backslash is not enough to make it valid. This is because the backslash is an invalid character itself (However, forward slashes /
are valid)
Sources:
Which Characters Make a Url Invalid? asked by good, answered by Gumbo.
Java.net.MalformedURLException: no protocol on URL based on a string modified with URLEncoder asked by MorkPork, answered by m-szalik.
Url-encode-decode.com. scripted and maintained by Dan from DansTools.com.
Best Answer
Your able to do this by changing the
dl=0
todl=1
at the end of the DropBox URL. I've used this method several times to host server resource packs on DropBox.What's happening is that when dl = 0 it will show the downloads page with the button for that file, and when you do dl = 1, it's a direct link to download the actual file.
Here is a guide by a the Minecraft server hosting company, MCProHosting on doing what you want with photos https://clients.mcprohosting.com/knowledgebase/96/How-to-Add-a-Resource-Pack-to-a-Minecraft-Server.html