diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 3cb999bee5..d9fdcde732 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -206,6 +206,7 @@ namespace OpenSim
MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this));
if (userStatsURI != String.Empty)
MainServer.Instance.AddStreamHandler(new OpenSim.UXSimStatusHandler(this));
+ MainServer.Instance.AddStreamHandler(new OpenSim.SimRobotsHandler());
if (managedStatsURI != String.Empty)
{
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 52ded3d055..8499a90acd 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -876,6 +876,26 @@ namespace OpenSim
}
}
+ ///
+ /// handler to supply serving http://domainname:port/robots.txt
+ ///
+ public class SimRobotsHandler : BaseStreamHandler
+ {
+ public SimRobotsHandler() : base("GET", "/robots.txt", "SimRobots.txt", "Simulator Robots.txt") {}
+
+ protected override byte[] ProcessRequest(string path, Stream request,
+ IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
+ {
+ string robots = "# go away\nUser-agent: *\nDisallow: /\n";
+ return Util.UTF8.GetBytes(robots);
+ }
+
+ public override string ContentType
+ {
+ get { return "text/plain"; }
+ }
+ }
+
#endregion
///