Strange download file behaviour

Hi to everybody. I use the following code in a xojo desktop application to download a file from my website and copying on user’s desktop.
The function works fine but opening the pdf i get the following error:

“Acrobat reader is unable to open the file because is not correctly formatted or is damaged”

Downloading normally from the browser the file (the sample path is incorrect) it opens

My code:

[quote]dim http As New HTTPSocket

Dim f as FolderItem = SpecialFolder.Desktop.Child(“Manuale.pdf”)
http.Get(“https://www.micropedia.net/manuali/Manuale.pdf”, f)

msgbox “Manual is available on the desktop”[/quote]

Easy, you request a secure website with an insecure connection. https:// requires HTTPSecureSocket

ok but why after download ? Might you post me a sample of secure connection?

Well your downloading encrypted stuff i guess.
You might wanna look in the examples or the documentation for HTTPSecureSocket

I solved using CURL Download component from Monkeybread
God bless Christian Schmitz