]> code.citadel.org Git - citadel.git/blobdiff - webcit/context_loop.c
Return 404 for robots.txt
[citadel.git] / webcit / context_loop.c
index 2dd63c9a2efdb551193577e536d64489caa7b04a..1f140184c5f750bdaf958c8771e54f6e68ec4323 100644 (file)
@@ -114,7 +114,7 @@ void check_thread_pool_size(void)
        if (time_to_die) return;                /* don't expand the thread pool during shutdown */
 
        begin_critical_section(S_SPAWNER);      /* only one of these should run at a time */
-       while (
+       if (
                (num_threads_executing >= num_threads_existing)
                && (num_threads_existing < MAX_WORKER_THREADS)
        ) {
@@ -805,6 +805,7 @@ InitModule_CONTEXT
        RegisterNamespace("NONCE", 0, 0, tmplput_nonce, NULL, 0);
 
        WebcitAddUrlHandler(HKEY("404"), "", 0, do_404, ANONYMOUS|COOKIEUNNEEDED);
+       WebcitAddUrlHandler(HKEY("robots.txt"), "", 0, do_404, ANONYMOUS|COOKIEUNNEEDED);
 /*
  * Look for commonly-found probes of malware such as worms, viruses, trojans, and Microsoft Office.
  * Short-circuit these requests so we don't have to send them through the full processing loop.