Added non-caching headers (should be placed in config file I guess).
[pazpar2-moved-to-github.git] / src / http_command.c
index d03387d..1fef304 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: http_command.c,v 1.15 2007-01-09 22:27:10 quinn Exp $
+ * $Id: http_command.c,v 1.17 2007-01-11 10:03:01 sondberg Exp $
  */
 
 #include <stdio.h>
@@ -99,7 +99,7 @@ unsigned int make_sessionid()
     if (gettimeofday(&t, 0) < 0)
         abort();
     res = t.tv_sec;
-    res = ((res << 8) | (seq & 0xff)) & ((unsigned int) (1 << 31) - 1);
+    res = ((res << 8) | (seq & 0xff)) & ((1U << 31) - 1);
     return res;
 }
 
@@ -522,6 +522,10 @@ void http_command(struct http_channel *c)
     int i;
 
     c->response = rs;
+
+    http_addheader(rs, "Expires", "Thu, 19 Nov 1981 08:52:00 GMT");
+    http_addheader(rs, "Cache-Control", "no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
+
     if (!command)
     {
         error(rs, "417", "Must supply command", 0);