]> code.citadel.org Git - citadel.git/blobdiff - webcit/context_loop.c
* Discovered that Prototype makes it easy to auto-refresh, so I switched
[citadel.git] / webcit / context_loop.c
index 9fd9ba8fe4f9b003457879b5ff7bb21ef72eb33a..a3541dd87cf56a15933d843e38ef4bb2bcbc19f1 100644 (file)
@@ -8,32 +8,6 @@
  *
  */
 
-#include <ctype.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <stdio.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/socket.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#include <netinet/in.h>
-#include <netdb.h>
-#include <string.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <pthread.h>
-#include <signal.h>
 #include "webcit.h"
 #include "webserver.h"
 
@@ -311,6 +285,10 @@ void context_loop(int sock)
                        extract_token(httpauth_pass, httpauth_string, 1, ':', sizeof httpauth_pass);
                }
 
+               if (!strncasecmp(buf, "If-Modified-Since: ", 19)) {
+                       if_modified_since = httpdate_to_timestamp(&buf[19]);
+               }
+
                /*
                 * Read in the request
                 */
@@ -347,7 +325,7 @@ void context_loop(int sock)
         */
        if (!strncasecmp(buf, "/robots.txt", 11)) {
                strcpy(req->line, "GET /static/robots.txt"
-                               "?force_close_session=yes HTTP/1.0");
+                               "?force_close_session=yes HTTP/1.1");
        }
        else if (!strncasecmp(buf, "/favicon.ico", 12)) {
                strcpy(req->line, "GET /static/favicon.ico");
@@ -363,9 +341,10 @@ void context_loop(int sock)
                && (strncasecmp(buf, "/freebusy", 9))
                && (strncasecmp(buf, "/do_logout", 10))
                && (strncasecmp(buf, "/groupdav", 9))
+               && (strncasecmp(buf, "/rss", 4))
                && (got_cookie == 0)) {
                strcpy(req->line, "GET /static/nocookies.html"
-                               "?force_close_session=yes HTTP/1.0");
+                               "?force_close_session=yes HTTP/1.1");
        }
 
        /*