It seems that the server only listens on IPv4, but httpserver.host returns localhost.
This will resolve to ::1 on a dual-stack system, so connecting to it will fail. httpserver.host should either return an IPv4 address, or the server should listen on both.
On most OSs, listening to just IPv6 implicitly listens on IPv4, so it might just be a matter of listening on the latter.
It seems that the server only listens on IPv4, but
httpserver.hostreturnslocalhost.This will resolve to
::1on a dual-stack system, so connecting to it will fail.httpserver.hostshould either return an IPv4 address, or the server should listen on both.On most OSs, listening to just IPv6 implicitly listens on IPv4, so it might just be a matter of listening on the latter.