diff options
author | UbitUmarov | 2016-12-30 01:52:02 +0000 |
---|---|---|
committer | UbitUmarov | 2016-12-30 01:52:02 +0000 |
commit | 2a01173715e8adc9ea2f263221aed1302ed7675f (patch) | |
tree | 116300a1eebe09421da112635be883196f2b41f0 /OpenSim/Region/Application/OpenSimBase.cs | |
parent | Merge branch 'master' into httptests (diff) | |
parent | Serving robots.txt from bin Idea of solution for http://opensimulator.org/man... (diff) | |
download | opensim-SC-2a01173715e8adc9ea2f263221aed1302ed7675f.zip opensim-SC-2a01173715e8adc9ea2f263221aed1302ed7675f.tar.gz opensim-SC-2a01173715e8adc9ea2f263221aed1302ed7675f.tar.bz2 opensim-SC-2a01173715e8adc9ea2f263221aed1302ed7675f.tar.xz |
Merge branch 'master' into httptests
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 90505e1..b8363ab 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -898,6 +898,26 @@ namespace OpenSim | |||
898 | } | 898 | } |
899 | } | 899 | } |
900 | 900 | ||
901 | /// <summary> | ||
902 | /// handler to supply serving http://domainname:port/robots.txt | ||
903 | /// </summary> | ||
904 | public class SimRobotsHandler : BaseStreamHandler | ||
905 | { | ||
906 | public SimRobotsHandler() : base("GET", "/robots.txt", "SimRobots.txt", "Simulator Robots.txt") {} | ||
907 | |||
908 | protected override byte[] ProcessRequest(string path, Stream request, | ||
909 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | ||
910 | { | ||
911 | string robots = "# go away\nUser-agent: *\nDisallow: /\n"; | ||
912 | return Util.UTF8.GetBytes(robots); | ||
913 | } | ||
914 | |||
915 | public override string ContentType | ||
916 | { | ||
917 | get { return "text/plain"; } | ||
918 | } | ||
919 | } | ||
920 | |||
901 | #endregion | 921 | #endregion |
902 | 922 | ||
903 | /// <summary> | 923 | /// <summary> |