Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
According to https://github.com/mono/xsp/blob/master/src/Mono.WebServer.FastCgi/Sockets/TcpSocket.cs#L38
public TcpSocket (System.Net.IPAddress address, int port)
: this (new System.Net.IPEndPoint (Equals(address, System.Net.IPAddress.Any) ?
System.Net.IPAddress.Loopback : address, port))
there is no possibility to start fastcgi on IPAddress.Any (0.0.0.0), because of forced conversion to IPAddress.Loopback (127.0.0.0).
Is any reason to do this? Fastcgi on 127.0.0.0 listen only internal host tcp traffic. It works in case nginx and fastcgi are running on the one host, otherwise (different hosts) we have to add firewall rules to allow remote traffic from nginx get to fastcgi.
I think the conversion 0.0.0.0 => 127.0.0.0.1 is meaningless and we should remove the one.
According to git history before Jun 3 2013 there has been mistake, which was fixed by this commit https://github.com/mono/xsp/commit/0f0cee3a3cc4658e2f3b29a3eb77cb4b878d4542
Before this commit there was reference equals, which was always false, instead of IPEndPoint.Equals. So this converting really worked only after this commit.
IPAddress doesn't override operator ==, only Equals (https://github.com/mono/mono/blob/master/mcs/class/System/System.Net/IPAddress.cs#L479)
so on Apache mod also can work on 0.0.0.0 only because of mistake with ==
Yeah, you're correct this looks pretty pointless. I think we can remove it.
The == comparison in the Apache mod has been that way since the beginning  and the FastCgi one started out the same way in  but was later changed as you said.
Fixed by https://github.com/mono/xsp/pull/73