DownloadFile with https protocol

Find quick help here to get you started with Hollywood
Post Reply
yssing
Posts: 7
Joined: Wed Jan 15, 2014 5:57 pm

DownloadFile with https protocol

Post by yssing »

When I try to download a file from the web, on an https connection via DownloadFile() it fails with a "Unknown protocol in URL!"
I can download them using http, but its not enough in my case.
Is there any way to download files using the https?
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: DownloadFile with https protocol

Post by Bugala »

Whiel waiting for someone who actually knows, this is just a guess, since I am not that well aware of this topic, but https, that last letter s probably means "security" or something similar. Which means that there might be some sort of encryption in place, which in turn means that to download from https address you would need some sort of encryption in place. Maybe a plugin that is not existing yet.
yssing
Posts: 7
Joined: Wed Jan 15, 2014 5:57 pm

Re: DownloadFile with https protocol

Post by yssing »

Yes exactly, and that is the problem.
But if some one did have a fix for it, I would be very happy.
User avatar
JurassicC
Posts: 36
Joined: Fri May 25, 2012 9:48 pm

Re: DownloadFile with https protocol

Post by JurassicC »

https uses tcp port 443 not 80.
you could try
Downloadfile("https://www.yourserver.com:443/file")...... dont know if that would work

or

OpenConnection(1, yoursever.com , 443)
Then use http get and put commands via receivedata to get the necessary file.

Edit you cant use download file this is what you get back

<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx</center>
</body>
</html>
AmigaOne X1000 - RadeonHD 7870, 4GB RAM - AmigaOS 4.1ß
AmigaOne X5000 - Radeon R7 250, 2GB RAM - AmigaOS 4.1ß
User avatar
JurassicC
Posts: 36
Joined: Fri May 25, 2012 9:48 pm

Re: DownloadFile with https protocol

Post by JurassicC »

This doesnt work either

OpenConnection (1, "www.djangoproject.com", 443)
SendData(1, "GET https://www.djangoproject.com/m/release ... 6.2.tar.gz ".."/HTTP/1.0\r\n\r\n")
a$=ReceiveData(1, #RECEIVEALL)
CloseConnection(1)
OpenFile(1, "downloadedfile", #MODE_WRITE)
WriteLine(1,a$)
CloseFile(1)

It looks like to emulate a https get request there would need to be an opensslconnection function
AmigaOne X1000 - RadeonHD 7870, 4GB RAM - AmigaOS 4.1ß
AmigaOne X5000 - Radeon R7 250, 2GB RAM - AmigaOS 4.1ß
yssing
Posts: 7
Joined: Wed Jan 15, 2014 5:57 pm

Re: DownloadFile with https protocol

Post by yssing »

I tried the same on windows hollywood, the same result.
The plain HTTP request was sent to HTTPS port
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: DownloadFile with https protocol

Post by airsoftsoftwair »

HTTPS needs SSL support which Hollywood currently doesn't provide. You can use wget or some other external program as a workaround.
Post Reply