Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Operating Systems
»
macOS / Mac OS X
»
Download a file from internet ...
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
How to use the LazarusIDE...
by
fcb
[
Today
at 04:54:00 am]
libTIFF for Lazarus - rea...
by
TRon
[
Today
at 04:35:47 am]
Extended ascii characters...
by
440bx
[
Today
at 03:25:52 am]
ThemeServices.DrawText in...
by
regs
[
Today
at 02:59:00 am]
Hively Library
by
Guva
[
Today
at 02:49:04 am]
Where do I get IdHTTP, ...
by
Remy Lebeau
[
Today
at 02:07:51 am]
Problems with calling ffm...
by
jianwt
[
Today
at 01:41:24 am]
TStringList with .Count m...
by
dsiders
[
Today
at 12:34:10 am]
IDE does not compile anym...
by
TRon
[February 16, 2025, 10:54:03 pm]
Focus return does not wor...
by
dsiders
[February 16, 2025, 10:10:54 pm]
libRAW for Lazarus - read...
by
MarkMLl
[February 16, 2025, 10:05:40 pm]
I've written a program
by
MarkMLl
[February 16, 2025, 09:56:45 pm]
Treeview: full-width back...
by
d7_2_laz
[February 16, 2025, 08:53:21 pm]
MyLangEdit 2.0 for editin...
by
CM630
[February 16, 2025, 08:15:16 pm]
Interoperability between ...
by
setghm
[February 16, 2025, 07:29:12 pm]
[SOLVED] Form not showing...
by
Axessible
[February 16, 2025, 06:40:22 pm]
Can't find unit unixsocke...
by
TCH
[February 16, 2025, 06:28:48 pm]
LZ4 Compression and Decom...
by
Tomxe
[February 16, 2025, 05:22:02 pm]
SWP Simple Web Player.
by
Fred vS
[February 16, 2025, 05:16:13 pm]
OnGuard troubles with TOg...
by
wp
[February 16, 2025, 05:07:48 pm]
A circular / ring buffer ...
by
Thaddy
[February 16, 2025, 05:04:47 pm]
Source code explorer - te...
by
erol
[February 16, 2025, 05:04:05 pm]
Problems with anchors in ...
by
simsee
[February 16, 2025, 04:40:13 pm]
YM Player
by
Gigatron
[February 16, 2025, 03:47:27 pm]
fpexprpars Invalid FLT/in...
by
ASerge
[February 16, 2025, 03:20:17 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Download a file from internet ... (Read 1393 times)
Espectr0
Full Member
Posts: 221
Download a file from internet ...
«
on:
April 23, 2023, 04:48:17 pm »
Hola,
If I try to download a file from the internet from my app,
I get the exception "connection failed:443" in macOS while on Windows it works without problem.
Is it something I can solve or are they Apple limits?
Thanks
Logged
TRon
Hero Member
Posts: 3988
Re: Download a file from internet ...
«
Reply #1 on:
April 23, 2023, 04:59:36 pm »
Hi Espectr0,
You really need to provide a little more information. There are many components/packages/solutions to download a file with Pascal. For all we know you are trying to execute wget and it fails returning that error for you (I do not use macos so have no idea but more information does help me in trying to search for a solution).
Even better would be if you would be able to share some code (but that's not always necessary to do so but would be preferred if you are able to). Other than that some information on what version of FPC/Lazarus and/or version of component/package that is used).
That way people are more inclined to provide a better answer (other hen pasting their own solution that works for them)
edit: Right now I can only answer with that your used solution seem unable to connect in secure way probably/perhaps missing (correct/supported version of) ssl libraries ?
«
Last Edit: April 23, 2023, 05:09:18 pm by TRon
»
Logged
I do not have to remember anything anymore thanks to total-recall.
Espectr0
Full Member
Posts: 221
Re: Download a file from internet ...
«
Reply #2 on:
April 23, 2023, 06:14:53 pm »
Hola TRon,
used the following code:
Code: Pascal
[Select]
[+]
[-]
fphttpclient
,
opensslsockets
...
FDS
:
=
TFileStream
.
Create
(
AFileName
,
fmCreate
)
;
try
try
FHTTPClient
.
HTTPMethod
(
'GET'
,
AURL
,
FDS
,
[
200
]
)
;
except
on E
:
Exception
do
begin
end
;
end
;
finally
FDS
.
Free
;
end
;
to connect via https and download a file, as I always say, in Windows it works correctly but in macOS I get that expexion.
Logged
TRon
Hero Member
Posts: 3988
Re: Download a file from internet ...
«
Reply #3 on:
April 23, 2023, 07:38:04 pm »
I have no idea how to check what could be the culprit (assuming that your used URL is valid and you are allowed to connect. Make sure to check firewall and file/application permissions perhaps even virus checker.).
Did you read
https://wiki.freepascal.org/macOS_Programming_Tips#OpenSSL.2C_LibreSSL.2C_Secure_Transport.2C_Network_Framework
?
Logged
I do not have to remember anything anymore thanks to total-recall.
Espectr0
Full Member
Posts: 221
Re: Download a file from internet ...
«
Reply #4 on:
April 23, 2023, 09:28:56 pm »
Thanks, I'll investigate how to use Apple's standard framework
Logged
ozznixon
Full Member
Posts: 119
Re: Download a file from internet ...
«
Reply #5 on:
May 21, 2023, 08:31:29 pm »
You could share the URL.
It could be simple things like - Datetime is invalid, Self Signed Certificate and OS is not set to allow, etc.
Posting the URL will allow us to help you.
Best Regards,
Ozz
Logged
---
Want to kick the tires to a Free Pascal like script engine?
http://www.ModernPascal.com/
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Operating Systems
»
macOS / Mac OS X
»
Download a file from internet ...
TinyPortal
© 2005-2018