[freenet-cvs] r13291 - trunk/freenet/src/freenet/clients/http

nextgens at freenetproject.org nextgens at freenetproject.org
Mon May 21 11:11:56 UTC 2007


Author: nextgens
Date: 2007-05-21 11:11:55 +0000 (Mon, 21 May 2007)
New Revision: 13291

Modified:
   trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
Log:
Add a /robots.txt file to fproxy to prevent bots from indexing it (requested by apophis)

Modified: trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/FProxyToadlet.java	2007-05-21 11:01:06 UTC (rev 13290)
+++ trunk/freenet/src/freenet/clients/http/FProxyToadlet.java	2007-05-21 11:11:55 UTC (rev 13291)
@@ -317,6 +317,9 @@
 				ctx.writeData(buf, 0, len);
 			}
 			return;
+		}else if(ks.equals("/robots.txt")){
+			this.writeReply(ctx, 400, "text/plain", "robots.txt", "User-agent: *\nDisallow: /");
+			return;
 		}
 		
 		if(ks.startsWith("/"))




More information about the cvs mailing list