From 9183c5507f88e525ff8c9f33e77aa791bcecae25 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 14 Sep 2010 22:35:29 -0400 Subject: [PATCH] Revert "No more robots.txt, we now welcome spiders" This reverts commit 593d0c23d2422a6a1fc9ceb7de9bda66335e0836. --- webcit/html2html.c | 1 - webcit/roomviews.c | 43 +++++++++++++--------------------------- webcit/static.c | 1 + webcit/static/robots.txt | 3 +++ webcit/webcit.c | 17 ---------------- webcit/webserver.c | 14 +------------ 6 files changed, 19 insertions(+), 60 deletions(-) create mode 100644 webcit/static/robots.txt diff --git a/webcit/html2html.c b/webcit/html2html.c index aff7eec7b..a7bb2eb5a 100644 --- a/webcit/html2html.c +++ b/webcit/html2html.c @@ -16,7 +16,6 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "webcit.h" diff --git a/webcit/roomviews.c b/webcit/roomviews.c index 45e2ead95..6585835c9 100644 --- a/webcit/roomviews.c +++ b/webcit/roomviews.c @@ -1,21 +1,5 @@ /* * Lots of different room-related operations. - * - * Copyright (c) 1996-2010 by the citadel.org team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "webcit.h" @@ -33,25 +17,24 @@ ROOM_VIEWS exchangeable_views[VIEW_MAX][VIEW_MAX] = { /* the different kinds of {VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_WIKI, VIEW_MAX, VIEW_MAX, VIEW_MAX}, {VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_CALENDAR, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX/*VIEW_CALBRIEF*/, VIEW_MAX, VIEW_MAX}, {VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_JOURNAL, VIEW_MAX }, -{VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_DRAFTS, VIEW_MAX }, {VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_MAX, VIEW_BLOG }, }; /* the brief calendar view is disabled: VIEW_CALBRIEF */ ROOM_VIEWS allowed_default_views[VIEW_MAX] = { - 1, /* VIEW_BBS Bulletin board */ - 1, /* VIEW_MAILBOX Mailbox summary */ - 1, /* VIEW_ADDRESSBOOK Address book */ - 1, /* VIEW_CALENDAR Calendar by month or day */ - 1, /* VIEW_TASKS Task list */ - 1, /* VIEW_NOTES Sticky notes */ - 1, /* VIEW_WIKI Wiki */ - 0, /* VIEW_CALBRIEF Calendar list of events */ - 0, /* VIEW_JOURNAL Journal */ - 0, /* VIEW_DRAFTS Drafts */ - 1 /* VIEW_BLOG Blog */ + 1, /* VIEW_BBS Bulletin board view */ + 1, /* VIEW_MAILBOX Mailbox summary */ + 1, /* VIEW_ADDRESSBOOK Address book view */ + 1, /* VIEW_CALENDAR Calendar view */ + 1, /* VIEW_TASKS Tasks view */ + 1, /* VIEW_NOTES Notes view */ + 1, /* VIEW_WIKI Wiki view */ + 0, /* VIEW_CALBRIEF Brief Calendar view */ + 0, /* VIEW_JOURNAL Journal view */ + 0 /* VIEW_BLOG Blog view (not yet implemented) */ }; + /* * Initialize the viewdefs with localized strings */ @@ -65,7 +48,6 @@ void initialize_viewdefs(void) { viewdefs[VIEW_WIKI] = _("Wiki"); viewdefs[VIEW_CALBRIEF] = _("Calendar List"); viewdefs[VIEW_JOURNAL] = _("Journal"); - viewdefs[VIEW_DRAFTS] = _("Drafts"); viewdefs[VIEW_BLOG] = _("Blog"); } @@ -278,4 +260,7 @@ InitModule_ROOMVIEWS RegisterNamespace("ROOM:INFO:VIEW", 0, 1, tmplput_ROOM_VIEW, NULL, CTX_ROOMS); RegisterNamespace("ROOM:INFO:COLLECTIONTYPE", 0, 1, tmplput_ROOM_COLLECTIONTYPE, NULL, CTX_ROOMS); + + + } diff --git a/webcit/static.c b/webcit/static.c index 1a83993d1..46770bf12 100644 --- a/webcit/static.c +++ b/webcit/static.c @@ -300,6 +300,7 @@ InitModule_STATIC LoadStaticDir(static_dirs[2], StaticFilemappings[2], ""); LoadStaticDir(static_dirs[3], StaticFilemappings[3], ""); + WebcitAddUrlHandler(HKEY("robots.txt"), "", 0, output_flat_static, ANONYMOUS|COOKIEUNNEEDED|ISSTATIC|LOGCHATTY); WebcitAddUrlHandler(HKEY("favicon.ico"), "", 0, output_flat_static, ANONYMOUS|COOKIEUNNEEDED|ISSTATIC|LOGCHATTY); WebcitAddUrlHandler(HKEY("static"), "", 0, output_static_0, ANONYMOUS|COOKIEUNNEEDED|ISSTATIC|LOGCHATTY); WebcitAddUrlHandler(HKEY("static.local"), "", 0, output_static_1, ANONYMOUS|COOKIEUNNEEDED|ISSTATIC|LOGCHATTY); diff --git a/webcit/static/robots.txt b/webcit/static/robots.txt new file mode 100644 index 000000000..8fe8379dc --- /dev/null +++ b/webcit/static/robots.txt @@ -0,0 +1,3 @@ +# WebCit deals exclusively in dynamic content and cannot be spidered. Go away. +User-agent: * +Disallow: / diff --git a/webcit/webcit.c b/webcit/webcit.c index 16c533b97..507f6a365 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -2,24 +2,7 @@ * This is the main transaction loop of the web service. It maintains a * persistent session to the Citadel server, handling HTTP WebCit requests as * they arrive and presenting a user interface. - * - * Copyright (c) 1996-2010 by the citadel.org team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - #define SHOW_ME_VAPPEND_PRINTF #include #include diff --git a/webcit/webserver.c b/webcit/webserver.c index 0fcb030f5..87b83afad 100644 --- a/webcit/webserver.c +++ b/webcit/webserver.c @@ -4,20 +4,8 @@ * connection is established, it calls context_loop() from context_loop.c. * * Copyright (c) 1996-2010 by the citadel.org developers. + * This program is released under the terms of the GNU General Public License v3. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "webcit.h" -- 2.30.2