aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorMandarinka Tasty2016-12-29 23:20:33 +0100
committerMelanie Thielker2016-12-29 22:32:08 +0000
commitaee3f273f099c16a770ad4f3f4c9f1ee40227aef (patch)
tree479b60c61e00cf80251eb6b403e7e0b361a3cac0 /OpenSim/Region/Application
parentAdd a MaxRetries option to the inventory connector. (diff)
downloadopensim-SC_OLD-aee3f273f099c16a770ad4f3f4c9f1ee40227aef.zip
opensim-SC_OLD-aee3f273f099c16a770ad4f3f4c9f1ee40227aef.tar.gz
opensim-SC_OLD-aee3f273f099c16a770ad4f3f4c9f1ee40227aef.tar.bz2
opensim-SC_OLD-aee3f273f099c16a770ad4f3f4c9f1ee40227aef.tar.xz
Serving robots.txt from bin Idea of solution for http://opensimulator.org/mantis/view.php?id=7392
Signed-off-by: Mandarinka Tasty <mandarinka.tasty@gmail.com> Signed-off-by: Melanie Thielker <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs1
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs20
2 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 3cb999b..d9fdcde 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -206,6 +206,7 @@ namespace OpenSim
206 MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this)); 206 MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this));
207 if (userStatsURI != String.Empty) 207 if (userStatsURI != String.Empty)
208 MainServer.Instance.AddStreamHandler(new OpenSim.UXSimStatusHandler(this)); 208 MainServer.Instance.AddStreamHandler(new OpenSim.UXSimStatusHandler(this));
209 MainServer.Instance.AddStreamHandler(new OpenSim.SimRobotsHandler());
209 210
210 if (managedStatsURI != String.Empty) 211 if (managedStatsURI != String.Empty)
211 { 212 {
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 52ded3d..8499a90 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -876,6 +876,26 @@ namespace OpenSim
876 } 876 }
877 } 877 }
878 878
879 /// <summary>
880 /// handler to supply serving http://domainname:port/robots.txt
881 /// </summary>
882 public class SimRobotsHandler : BaseStreamHandler
883 {
884 public SimRobotsHandler() : base("GET", "/robots.txt", "SimRobots.txt", "Simulator Robots.txt") {}
885
886 protected override byte[] ProcessRequest(string path, Stream request,
887 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
888 {
889 string robots = "# go away\nUser-agent: *\nDisallow: /\n";
890 return Util.UTF8.GetBytes(robots);
891 }
892
893 public override string ContentType
894 {
895 get { return "text/plain"; }
896 }
897 }
898
879 #endregion 899 #endregion
880 900
881 /// <summary> 901 /// <summary>