HTTPS SNI host name normalization
When setting the host name for HTTPS (here and perhaps here and perhaps elsewhere), it needs to
- remove a trailing dot
- convert the hostname to lowercase
freepascal.org and freepascal.org. might different websites, so it needs to keep the dot for HTTP, but for HTTPS it needs to removed
(see https://daniel.haxx.se/blog/2022/05/12/a-tale-of-a-trailing-dot/ )