yesodweb/wai — Issue #16: ipv6 default for warp causes some problems
Author: luite
Created: 2011-10-11 22:10:56+00:00
State: open

Warp tries to open an ipv6 socket if one is available, but this seems to cause problems for some users. Many people probably expect a server to respond to 127.0.0.1, and not all platforms forward connections automatically to v6 (there was a user who reported problems in #yesod, on Windows, don't know if he also had trouble connecting to http;//localhost ). Happstack defaults to opening an ipv4 socket because of this.

We can solve this in a number of ways:
- change the defaultSettings settingsHost "*" to "0.0.0.0"
- leave defaultSettings host "*", but add a field to indicate whether we prefer v4 or v6
- same as above, but fail if the preferred socket type is not available for the chosen settingsHost.

The first one is the easiest, perhaps we can add the old default settings back with defaultSettingsPreferIpv6 ?

Any thoughts, any disadvantages of using a 0.0.0.0 bind address to force ipv4?