#1 mORMot 2 » GetSystemPath has problem with Unicode address » 2024-08-19 13:56:59

sayencrusher
Replies: 1

I encountered an issue with `GetSystemPath` when dealing with Unicode paths. Specifically, the function returns an incorrect path for usernames containing Unicode characters. It seems that Lazarus's `GetAppConfigDir(False)` handles this correctly, likely because it uses `SHGetFolderPathW` (the wide-character version) instead of `SHGetFolderPath`, which mORMot relies on. This difference in API calls might cause incorrect path handling in mORMot.

Has anyone else faced this, and are there any known workarounds or fixes?

#2 Re: mORMot 2 » SSL Errors on macOS with mORMot2 in Lazarus Project » 2024-08-12 09:21:31

In some other part of my project I am using "MainHttpClass" function in mormot.net.client file, and it works fine in mac for my network communications without openssl, and I have a custom setting for my project set in my compiler options additions and overrides, stored in my lpi file like this:
-Scghi -CX -XX  -l -vewnhibq -dX_RELEASE -dUSELIBCURL

now I need to use the "THttpClientSocket" client to use its "WGet" function as it fulfills my needs, but because the openssl libs you mentioned have big sizes, I need to know if there is a way to use libcurl instead of openssl in all the platforms for this client as well, is this possible in current mormot? and if it is possible how can I implement it?

thanks for your help.

#3 Re: mORMot 2 » SSL Errors on macOS with mORMot2 in Lazarus Project » 2024-08-08 13:57:28

Thank you so much, now it works perfectly fine, without even applying the second step which was:
- (optional, try it if it fails) then properly set OpenSslDefaultCrypto and OpenSslDefaultSsl global variables to point to them,

#4 Re: mORMot 2 » SSL Errors on macOS with mORMot2 in Lazarus Project » 2024-08-08 07:29:05

Thanks for your response, I didn't know I shouldn't include code in my questions, I am sorry for that. Do I need to use openssl in my Mac  version of this project?
Isn't there another way to use the same function and client but not the openssl?
Thanks in advance for any help

#5 mORMot 2 » SSL Errors on macOS with mORMot2 in Lazarus Project » 2024-08-07 15:02:33

sayencrusher
Replies: 6

Hi everyone,

I’m running this code in a Lazarus project on macOS, but I keep getting SSL-related errors. It runs fine on Windows and Linux by just adding "mormot.lib.openssl11" in the uses clause, but on macOS, I still get these errors. Doesn’t mORMot use cURL? Why does it need SSL? How can I fix this? Any help would be appreciated!
I have tried to install openssl on my Mac but the issues persist. Any insights on how to resolve this would be greatly appreciated!


These are the errors I get on macOS:

1) [Debugger Exception Notification] [Break]: Project raised exception class 'EOpenSsl' with message: TLibCrypto.TryLoadLibray failed
2: [Debugger Exception Notification] Project raised exception class 'ENetSock' with message: THttpClientSocket.DoTlsAfter: TLS failed [ENetSock THttpClientSocket.DoTlsAfter: TLS is not available on this system - try installing OpenSSL 1.1/3.x]


Here's the relevant code snippet:
https://gist.github.com/synopse/40f0440 … f9b8ee6e60

#6 Re: mORMot 2 » How to Properly Cancel a Download Using THttpClientSocket's WGet Funct » 2024-08-01 07:01:35

Thanks for your response, I am using the latest stable version and I can not find an abort function associated to the THttpClientSocket client, do you mean I should go to the newer versions?

https://github.com/synopse/mORMot2/rele … 2.2.stable

#7 mORMot 2 » How to Properly Cancel a Download Using THttpClientSocket's WGet Funct » 2024-07-31 15:35:40

sayencrusher
Replies: 3

Hello everyone,

I'm working on a downloader for large files using the `THttpClientSocket` client and its `WGet` function, inspired by the mORMot2 `mget` tool. The downloader works fine with tuned parameters, but I'm facing an issue canceling a download mid-process.

I've tried calling `client.close` to interrupt the download, but it doesn't seem to stop the download as expected. Could anyone guide me on the correct workflow to cancel a download, dismiss the cache, and prevent the download from continuing?

Any advice or suggestions would be greatly appreciated.

Thank you!

Board footer

Powered by FluxBB