changeset 3013:6238e1b2fd7f

do not send any 404 content to bots (port from 1.6)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 06 Jan 2008 19:24:28 +0100
parents ca0bf3aefa0f
children dc970f2d146c
files MoinMoin/Page.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Sun Jan 06 19:20:55 2008 +0100
+++ b/MoinMoin/Page.py	Sun Jan 06 19:24:28 2008 +0100
@@ -1094,6 +1094,10 @@
                     request.setHttpHeader('Status: 404 NOTFOUND')
                 request.emit_http_headers()
 
+            if not page_exists and self.request.isSpiderAgent:
+                # don't send any 404 content to bots
+                return
+
             request.write(self.formatter.startDocument(self.page_name))
 
             # send the page header