[fpc-devel] Problem in fphttpserver.pp?

David Connolly menounsef at gmail.com
Fri May 29 11:10:55 CEST 2026


Hi all,

I have a simple server (included) that has stopped working due to some
changes to fphttpserver or the sockets code.

The problem, as far as my limited knowledge goes, seems to stem
from FSocket.RemoteEndpoint.First.Address in fphttpserver.pp

Replacing the FSocket.RemoteEndpoint.First.Address
with HostAddrToStr(Data.RemoteAddress.sin_addr) - the old code - fixes the
issue.

Printing out FSocket.RemoteEndpoint.First.Address displays nothing.

To test the included program, run it and "curl -d some=data
http://127.0.0.1:8889"

FPC 3.3.1 (latest) Linux x86_64 (Debian 13.5)

Keep up the great work,

Regards,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20260529/54fee710/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: server.pas
Type: text/x-pascal
Size: 861 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20260529/54fee710/attachment.pas>


More information about the fpc-devel mailing list