<div>Hi Michael,</div><div><br></div><div>Kazu recently fixed this (in the stable branch on GitHub) in Network.listenOn but perhaps the more basic Network.Socket.listen should also be changed. Lets discuss what&#39;s the right thing to do in this thread.</div>

<div><br>On Wed, Sep 21, 2011 at 1:38 PM, Michael Snoyman <span dir="ltr">&lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;</span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi,<br>
<br>
One of the recurring issues that comes up in Warp is binding to IPv4<br>
versus IPv6 hosts. Our current code is available at [1]. It was<br>
updated to look like that in this commit [2] in order to support both<br>
IPv4 and IPv6 hosts by default. However, now it seems than on Debian<br>
and FreeBSD, it *only* responds to IPv6 by default[3][4]. I&#39;m frankly<br>
stumped at this point on how to have our cake and eat it too.<br>
<br>
Does anyone have an idea of the correct incantation to get Warp to do<br>
the Right Thing(tm) here? And if not, is there any advice on sensible<br>
default behavior? I&#39;m considering allowing a few special host values:<br>
<br>
* &quot;*&quot; (default, what we have now): Make this bind to IPv4<br>
* &quot;ipv4&quot;: Again, bind to IPv4. Guaranteed not to change in the future<br>
* &quot;ipv6&quot;: Bind to IPv6.<br>
<br>
Michael<br>
<br>
[1] <a href="https://github.com/yesodweb/wai/blob/master/warp/Network/Wai/Handler/Warp.hs#L119" target="_blank">https://github.com/yesodweb/wai/blob/master/warp/Network/Wai/Handler/Warp.hs#L119</a><br>
[2] <a href="https://github.com/snoyberg/warp/commit/02c1396c86e3fceb48cbe7df58cb631c804e24d4" target="_blank">https://github.com/snoyberg/warp/commit/02c1396c86e3fceb48cbe7df58cb631c804e24d4</a><br>
[3] <a href="https://github.com/snoyberg/warp/issues/9" target="_blank">https://github.com/snoyberg/warp/issues/9</a><br>
[4] <a href="http://stackoverflow.com/questions/7486257/yesod-devel-server-only-listening-on-ipv6" target="_blank">http://stackoverflow.com/questions/7486257/yesod-devel-server-only-listening-on-ipv6</a><br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br>