I'm running "cabal install && yesod devel" using yesod 0.9.开发者_Python百科2.2 but it is only listening using ipv6. Does anyone know how to configure it to listen on ipv4 as well? I'm running it on Windows 7.
Thanks
The symptom you describe have so far been observed on BSD and Debian, but it looks like Windows is also affected.
It is a known problem with Yesod, or actually with Wasp, or, to be precise, with the network library. One place to follow up on this issue is this githup issue or the current discussion on haskell-lists, which was partly caused by your question.
While I don't currently have a similar setup to test this, you will probably find that if something is listening to IPv6 port X, and there is nothing listening on the same port X for IPv4, then the IPv6 port will receive the connection. The IPv6 server will see a connection coming from "IPv6" address ::ffff:1.2.3.4 (this is called an IPv4 Mapped IPv6 address). The kernel provides the translation between the IPv6 and IPv4 endpoints. IPv4 is used over the wire.
I don't know about Windows 7, but some systems (eg. some Linux distributions) will by default disable this feature by setting a particular sysctl, which would mean that the server would need to bind to separate IPv4 and IPv6 sockets (which is, in my experience, the preferable option). Applications are free to override this default behaviour.
精彩评论